7.1 The program development life cycle
Programs should not be written by jumping straight into code. A problem first has to be understood, then a solution is designed, coded and tested. Topic 7.1 introduces these stages and the problem-solving ideas of abstraction and decomposition.
The life cycle at a glance
The textbook states that the program development life cycle has five stages: analysis, design, coding, testing and maintenance. Topic 7.1, together with the later programming material, concentrates on the first four stages. Maintenance is named as part of the overall life cycle, but the supplied 7.1 section does not develop it further.
| Stage | Main purpose in Topic 7.1 |
|---|---|
| Analysis | Define exactly what the program must do and produce a requirements specification. |
| Design | Plan the tasks, how each task will be carried out and how the tasks fit together. |
| Coding | Write the program modules in a suitable programming language. |
| Testing | Run the completed program with different sets of test data to check that the whole solution works as specified. |
| Maintenance | Named by the textbook as the fifth life-cycle stage; not expanded in this 7.1 section. |
Analysis
Before a problem can be solved, it must be clearly defined. Everyone working on the solution needs to understand what the program is expected to do. The documented statement of what is required is called the requirements specification.
The analysis stage uses two important problem-solving tools: abstraction and decomposition.
Abstraction
Abstraction means keeping the important information needed to solve the problem and leaving out details that are not relevant. The aim is to make the problem easier to understand without losing information that matters to the solution.

Figure 7.1 shows the idea well. A road map and a rail map can represent the same geographical area, but each keeps different information because each serves a different purpose. A road traveller needs road routes, while a rail traveller needs stations and railway lines. Unnecessary detail is discarded.
Decomposition
Decomposition means breaking a complex problem into smaller parts. Each part can be divided again until the pieces are small enough to understand and solve more easily.
Textbook example: getting dressed
The task can first be decomposed into:
- Select the items to wear.
- Remove any clothes already being worn.
- Put the selected items on in the correct order.
Each of these could be decomposed further if more detail were required.
Design
The program specification produced during analysis is used as the starting point for the design stage. By the end of design, the programmer should know:
- what tasks need to be completed
- how each task will be performed
- how the tasks work together to form the complete solution.
The source states that a design can be formally documented using structure charts, flowcharts and pseudocode. These are developed further in the following parts of Chapter 7.
Coding and iterative testing
During coding, the program or set of programs is developed. Each module is written in a suitable programming language and then tested to see whether it works correctly.
What iterative testing means
Iterative testing is a repeated cycle:
- Test a module.
- Identify what needs to be changed.
- Amend the code.
- Test the module again.
- Repeat the process until the module performs as required.
This is different from waiting until the entire program is finished before looking for faults. Testing is carried out while the modules are being developed, so problems can be corrected as the solution is built.
Testing
After the program or set of programs has been completed, it is run many times with different sets of test data. The purpose is to make sure that all the separate tasks and modules work together as required by the program design.
| Iterative testing during coding | Testing of the completed program |
|---|---|
| Focuses on individual modules while they are being developed. | Checks the completed program or set of programs. |
| Code is tested, amended and retested repeatedly. | The complete solution is run many times using different test data. |
| Goal: make each module perform as required. | Goal: confirm that all tasks work together as specified in the design. |