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.

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.

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