Good programs are not written by luck. They follow a clear program development life cycle of five phases, each finished before the next begins.
The five phases in order
- Analysis — study the problem and decide the required input, process and output.
- Design — plan the solution using tools such as a flowchart or pseudocode.
- Coding — translate the design into a programming language.
- Testing — run the program with data to find and remove errors.
- Documentation — record how the program works for users and future editors.
Key idea
Analysis → Design → Coding → Testing → Documentation. Remember the order: you cannot code what you have not designed, and you cannot test what you have not coded.
What happens in each phase
In analysis you ask "what is the input, what is the output, and what steps connect them?" In design you draw a flowchart or write pseudocode so the logic is clear before typing any code. Coding turns that plan into statements a computer understands. Testing checks that the output is correct for many inputs. Documentation includes internal comments and a user manual.
Example
To build a program that finds the average of three marks: analysis lists the three marks as input and the average as output; design writes average = (m1 + m2 + m3) / 3; coding types it in Python; testing tries marks 60, 70, 80 to check the answer is 70; documentation notes what the program does.
Remember
- Design comes before coding, never after.
- Documentation is a real phase, not an optional extra.
- Skipping analysis usually causes wrong output later.