Learning Objectives
  • Name and explain the four syllabus stages of the program development life cycle.
  • Distinguish the purpose of analysis, design, coding and testing.
  • Describe how the stages connect and why developers often return to an earlier stage.
  • Apply the life cycle to a short problem scenario.
Key Terms
Program development life cycle
A structured process used to turn a stated problem into a tested computer solution.
Analysis
The stage in which the problem and requirements are identified, unnecessary detail is removed and the problem is broken into manageable parts.
Design
The stage in which the planned solution is represented using methods such as structure diagrams, flowcharts and pseudocode.
Coding
The stage in which the design is translated into program code and checked repeatedly while it is being written.
Testing
The stage in which test data is used to establish whether the program behaves as intended.
Iterative testing
Testing small parts during coding, correcting them and testing again.
Summary diagram
Summary Of The Main Ideas In This Lesson
Why A Development Life Cycle Is Used

A computer program should solve a clearly defined problem. Beginning with code before the problem is understood often produces a program that performs the wrong task, omits a requirement or is difficult to test. The program development life cycle gives a logical order for moving from a problem statement to a working solution.

For this syllabus, the life cycle is limited to four stages: analysis, design, coding and testing. Other development models may include documentation, installation or maintenance, but these are not separate required stages in Topic 7. Students should use the four Cambridge stages precisely in examination answers.

The stages are shown in an order, but real development is rarely a single straight path. A failed test may reveal an error in the code, a weakness in the design or a missing requirement in the analysis. The developer then returns to the relevant stage, makes a correction and continues.

Analysis

Analysis establishes exactly what problem must be solved. The developer identifies the problem, the users needs and the required results. The developer also applies abstraction so that irrelevant real-world detail does not make the solution unnecessarily complicated.

The problem is decomposed into smaller parts. Inputs, processes, outputs and any storage requirements are identified. A good analysis gives measurable requirements. For example, “the system must accept five test marks, reject marks outside 0 to 100, calculate the average and display a grade” is more useful than “make a marks program.”

Design

During design, the developer plans how the requirements will be met before writing the final program. The solution can be broken into modules or sub-problems and represented using structure diagrams, flowcharts or pseudocode.

A design should show the order of processes, decisions, repetition, data movement and expected outputs. Because a design is easier to change than a completed program, errors found at this stage are usually cheaper and quicker to correct.

Coding And Iterative Testing

Coding translates the design into program code. The developer follows the chosen design rather than inventing the solution while typing. Meaningful identifiers and clear structure make it easier to compare the code with the design, although detailed maintainability techniques are covered in Topic 8.

Testing begins during coding. A developer may write one section, run it with simple data, correct errors and then add another section. This is iterative testing. It prevents many errors from accumulating before the whole program is run.

Final Testing With Test Data

The completed program is tested systematically using suitable data. Normal data checks ordinary expected use; abnormal data checks invalid inputs; extreme and boundary data check values near limits. The actual result is compared with the expected result.

Testing can show that an error exists, but passing a set of tests does not prove that a program can never fail. The quality of testing depends on the range of data and situations chosen.

Summary Of The Four Stages
Stage Main Tasks Typical Evidence
Analysis Identify problem and requirements; use abstraction and decomposition; identify input, process, output and storage A clear requirement list or problem specification
Design Plan the solution using decomposition, structure diagrams, flowcharts and pseudocode A representation of the algorithm and modules
Coding Translate the design into program code and test sections repeatedly Working code and corrections made during development
Testing Use test data and compare actual results with expected results A test plan or record of tests and outcomes
Worked Examples
School Trip Cost Program

Question: Apply the four stages to a program that calculates the cost per student for a school trip.

  1. Analysis: identify inputs such as total transport cost, entry fees and number of students; identify the required cost-per-student output.
  2. Design: show the formula and validation in pseudocode or a flowchart.
  3. Coding: write the program and test each calculation and input check as it is added.
  4. Testing: use normal values, a minimum allowed number of students, and invalid data such as zero students.

Answer: Each stage produces information used by the next stage, and failed tests may require changes to the code, design or requirements.

Finding The Stage

Question: A developer draws a flowchart showing the order of decisions before writing code. Which stage is this?

  1. A flowchart is a method used to represent a planned solution.
  2. The final code has not yet been written.

Answer: This is the design stage.

Examination Guidance
  • Use the exact four stages named in the syllabus.
  • When asked to apply a stage, describe specific tasks in the context rather than giving only a definition.
  • Do not place test-data selection only in coding; systematic use of test data belongs to the testing stage, although iterative testing occurs while coding.
  • Explain that a failed test can cause the developer to revisit an earlier stage.
  • Keep analysis and design separate: analysis decides what is required; design decides how the solution will work.
Common Mistakes
  • Listing planning, implementation and maintenance instead of the syllabus stages.
  • Saying analysis means analysing the finished results.
  • Describing design as choosing screen colours only.
  • Assuming testing happens only after all code has been written.
  • Claiming a program is error-free because it passed one test.
Knowledge Check

1. What are the four required stages?

Answer: Analysis, design, coding and testing.

2. What is the main purpose of analysis?

Answer: To identify the problem and requirements and break the problem into manageable parts.

3. Name three design methods.

Answer: Structure diagrams, flowcharts and pseudocode.

4. What is iterative testing?

Answer: Testing and correcting parts of the program repeatedly while coding.

5. Why may a developer return to analysis after testing?

Answer: A failed test may reveal that a requirement was missing or misunderstood.