Program development life cycle and decomposition

Computer Science · Algorithm design and problem-solving. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science topics

The idea

A program is developed in four stages, always in this order: analysis, design, coding and testing. In analysis the problem and its requirements are identified. In design the solution is planned. In coding the program is written and tested piece by piece. In testing the finished program is run with test data.

Two thinking tools are used. Abstraction means removing unnecessary detail so that only the important parts of the problem are kept. Decomposition means breaking a problem down into smaller sub-problems that are easier to solve. Every computer system is made of sub-systems, and each can be split into inputs, processes, outputs and storage.

A design is shown with a structure diagram, a flowchart or pseudocode.

In simpler words

Programs are made in four steps, always in this order: analysis, design, coding and testing. Abstraction means leaving out details you do not need. Decomposition means breaking a big problem into smaller ones. Each part has inputs, processes, outputs and storage. A design can be shown as a structure diagram, a flowchart or pseudocode.

An everyday comparison

Building a program is like planning a school trip. Abstraction is ignoring details that do not matter, like the colour of the bus. Decomposition is splitting the job into transport, food and permission slips, each easier to organise. The comparison stops working because a program must be designed precisely enough for a computer to follow every step exactly.

Rules to remember

Common mistake

Students often swap abstraction and decomposition. Abstraction removes detail that is not needed; decomposition breaks the problem into smaller parts.

In the exam

Name the four stages in order and give what happens in each. Define abstraction and decomposition separately with an example from the scenario. When decomposing, list the inputs, processes, outputs and storage. Draw a structure diagram level by level, or use the correct flowchart symbols. When asked for the purpose of an algorithm, describe what it achieves overall, not what each line does.

Worked example

What is the purpose of this algorithm?
FOR i ← 1 TO 12
    OUTPUT i * 7
NEXT i

  1. The loop runs 12 times, with i taking the values 1, 2, 3 and so on up to 12.
  2. Each time, it outputs i multiplied by 7: 7, 14, 21 and so on.
  3. The last value output is 12 × 7 = 84.

Answer: It outputs the 7 times table, from 1 × 7 = 7 up to 12 × 7 = 84.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← Artificial intelligenceStandard methods of solution →Take a Computer Science test