CS
Topic 7 Algorithm design & problem-solving · Page 7.1–7.6

Development Lifecycle

How software actually gets built. Analysis, design, coding, testing — the four stages of the program development life cycle, which Paper 2 regularly tests. This lab covers the life cycle, decomposition, structure diagrams, flowcharts, pseudocode, validation, verification and the four types of test data.

🧪 Exam Mode ON — write first, then reveal

📚 Book Notes — start here

Read this before you tap the activities. These notes give you everything you need to feel confident before hands-on work. When you're ready, tap 🎓 Learn to explore the Design Studio and Lifecycle Stepper.

🎯 Topic Overview

This is how programmers actually build software. You'll learn the four-stage program development life cycle (analysis → design → coding → testing) and the tasks in each stage, the three design methods (structure diagrams, flowcharts, pseudocode), and how to check data and test a program using validation, verification and the four types of test data (normal, abnormal, extreme, boundary). Paper 2 algorithm questions regularly test these skills.

🎓 Learning Objectives

By the end of this lab you should be able to…

  • Name and describe the four stages of the program development life cycle and the tasks in each
  • Explain abstraction, and that every computer system is made up of sub-systems
  • Apply decomposition to break a problem into its parts: inputs, processes, outputs and storage
  • Draw a structure diagram showing a program's shape
  • Draw a flowchart using the four correct symbols
  • Write pseudocode in the syllabus style
  • Translate pseudocode into a real programming language with meaningful identifiers
  • Choose suitable test data: normal, abnormal, extreme and boundary
  • Explain the difference between validation and verification, and write a validation loop and a double entry check

📖 Key Terminology

TermOne-line definition
AlgorithmA sequence of steps to solve a problem.
Life cycleFour stages: analysis · design · coding · testing.
AbstractionRemoving unnecessary detail so you can focus on what matters for the problem.
DecompositionBreaking a problem into smaller parts: inputs, processes, outputs and storage.
Structure diagramA tree showing a program and its subprograms.
FlowchartA diagram of program flow using standard symbols.
PseudocodeStructured English describing an algorithm.
ValidationAutomatic check that data is sensible.
VerificationCheck that data has been entered or copied accurately (it matches the original). Visual check or double entry check.
Test dataNormal · Abnormal (should be rejected) · Extreme (largest/smallest accepted) · Boundary (each limit and the value just outside it).

🧠 Core Theory

The four life-cycle stages

StageWhat happens
1. AnalysisIdentify the problem and the requirements. Use abstraction (remove unnecessary detail) and decomposition (inputs, processes, outputs, storage).
2. DesignPlan the solution: decomposition, structure diagrams, flowcharts, pseudocode.
3. CodingWrite the program code, with iterative testing (test each part as it is written, fix, retest).
4. TestingTest the finished program using test data: normal, abnormal, extreme and boundary.

The six validation checks

TypeEnforcesExample
RangeValue within limitsAge between 0 and 120
LengthExact/max charactersPhone = 11 digits
FormatData matches a patternEmail contains @
PresenceField is not blankRequired name field
TypeCorrect data typeNumber, not letters
Check-digitLast digit from othersISBN, barcode

💡 Worked Examples

Example 1 · Flowchart → Pseudocode

The flowchart (in text form):

[ Start ] → INPUT Age → < Age ≥ 18 ? >
   YES → OUTPUT "Adult"
   NO  → OUTPUT "Child"
→ [ Stop ]

The equivalent Cambridge pseudocode:

INPUT Age
IF Age >= 18
  THEN
    OUTPUT "Adult"
  ELSE
    OUTPUT "Child"
ENDIF

Syllabus style: THEN and ELSE on their own lines, indented two spaces; identifiers in PascalCase (Age).

Example 2 · Choosing test data for a whole number in the range 1–50

TypeValuesExpected outcome
Normal25, 33, 12Accepted
Abnormal-3, 75, "cat"Rejected → re-prompt
Extreme1, 50Accepted (the smallest and largest acceptable values)
Boundary0 and 1 · 50 and 511 and 50 accepted; 0 and 51 rejected (each limit and the value just outside it)

Some textbooks call abnormal data "erroneous". The syllabus uses normal, abnormal, extreme and boundary.

⚠️ Common Misconceptions

❌ "Validation and verification are the same thing"

Validation = data is sensible (follows the rules). Verification = data was entered or copied accurately (matches the original). They check different things.

❌ "A single IF is enough to make the user re-enter"

An IF can carry out a validation check, but it only checks once. To keep asking until valid data is entered, put the check in a loop (REPEAT … UNTIL or WHILE … DO).

❌ "Any variable name will do"

Examiners reject Array, x, temp, data. Use meaningful names like StudentScores, HighestMark.

❌ "Python is fine when the question says pseudocode"

The syllabus says solutions written in program code score no marks where pseudocode is required (the 15-mark scenario question is the exception). Use ENDIF, ENDWHILE, NEXT — not Python's if:, while:, def.

📋 Cambridge Exam Focus

Mark-winning tips distilled from the 2023–2025 examiner reports:

✎ Match the format to the command word. "Using pseudocode" → answer in pseudocode. "Draw a flowchart" → draw a flowchart. "Explain" → write prose.
✎ Use the syllabus pseudocode style. ENDIF, ENDWHILE, NEXT, ENDCASE, ENDPROCEDURE, ENDFUNCTION.
✎ Assignment operator is ← (left arrow; <- when typing), not = or :=.
✎ Data types: INTEGER, REAL, STRING, CHAR, BOOLEAN. Not "text", "number" or "bool".
✎ Meaningful identifiers. StudentScore, not x. HighestMark, not temp.
✎ Validation with re-input = a loop. An IF alone only checks once.
✎ Test data comes in four types. Normal, abnormal, extreme, boundary.

🎯 Quick Knowledge Check

Tap each question to reveal the answer. Get most of these right and you're ready for activities.

1. What are the four life-cycle stages, in order?
Analysis → Design → Coding → Testing.
2. What shape is a decision in a flowchart?
A diamond.
3. What are the four types of test data?
Normal (accepted), abnormal (should be rejected), extreme (largest/smallest acceptable value), boundary (each limit and the value just outside it).
4. What's the difference between validation and verification?
Validation checks data is sensible / follows the rules. Verification checks data has been entered or copied accurately (visual check, double entry check).
5. What's the Cambridge assignment operator?
← (left arrow; type it as <- if you need to). Not = and not :=.
6. Why does validation with re-input need a loop, not just an IF?
Because if the input is invalid, the user must be asked again and again until valid data is entered. An IF only checks once.

✅ Ready for activities when you can…

Name the four life-cycle stages. Know the difference between validation and verification. Recognise the flowchart symbols. Give an example of normal, abnormal, extreme and boundary test data.

Ready? Tap the 🎓 Learn tab and try the Design Studio — the same algorithm shown three ways.

📚 From the Textbook

Programs don't get written in one go. A developer follows a life cycle: understand the problem (analysis), plan the solution (design), write the code (coding), then check it works (testing). Analysis uses abstraction (remove unnecessary detail) and decomposition to break big problems into parts — inputs, processes, outputs and storage. Design uses three tools — structure diagrams for the shape of the program, flowcharts for the flow of decisions, and pseudocode for the actual instructions in a language-independent way. Coding includes iterative testing. Testing uses four kinds of data — normal, abnormal, extreme and boundary — and the program checks its input with validation (is the data sensible?) and verification (has the data been entered or copied accurately?). Get these ideas locked in and Paper 2 algorithm questions open up.

💡 Getting Started

Set up an obstacle course with chairs. Write instructions to guide a friend through it — how many steps, which way to turn. Copy them out neatly, then ask a second friend to compare your copy with the original (that's a visual check — a kind of verification). Get the first friend to follow them; if they hit something, your instructions failed testing. Amend and try again. That's the development life cycle in miniature.

🔬 Computer Science in Context

Safety-critical software — airline booking, flight control, hospital systems — has to check every input and be tested with normal, abnormal, extreme and boundary data, then traced and retested, before it is allowed near real users. When designers cut analysis or design short to "just start coding", the bugs surface later in testing, where they are much harder and more expensive to fix than if they had been caught in design.

💬 Discussion

Why do you think the same four stages (analysis, design, coding, testing) appear in every life-cycle model? What might go wrong if a team skips one? Which stage do you think is hardest — and why do students usually spend the least time on it?

⚠️ Validation vs Verification — the classic mix-up

Examiner reports regularly flag this. Candidates confuse them, invent hybrid definitions, or answer one when the other was asked. Learn the two definitions.

✅ Validation

What: checks whether input data is sensible / matches given rules.
When: during input.
Done by: the computer, automatically.
Types: range, length, format, presence, type, check-digit.
Re-input: to keep asking until valid data is entered, put the check in a loop (an IF on its own only checks once).

🔁 Verification

What: checks that data has been entered or copied accurately — it matches the original.
When: when data is input.
Types (syllabus): visual check (the user compares the data on screen with the original) and double entry check (the data is entered twice and the computer compares the two).
Not: checking whether the original data is true or sensible — only that it was copied accurately.
Parity, checksum and echo checks are Topic 2 error detection after transmission.

🔁 Validation and verification as algorithms

The syllabus asks you to write algorithms for these checks. Two patterns to learn:

Validation: range check with re-inputREPEAT OUTPUT "Enter a mark from 0 to 100" INPUT Mark UNTIL Mark >= 0 AND Mark <= 100
Verification: double entry checkREPEAT OUTPUT "Enter your password" INPUT Password1 OUTPUT "Enter it again" INPUT Password2 IF Password1 <> Password2 THEN OUTPUT "Entries do not match" ENDIF UNTIL Password1 = Password2

A visual check is done by the user: the program outputs the data that was entered and asks the user to confirm it matches the original.

🔷 Flowchart symbols

The syllabus lists six standard symbols: the four shapes below, plus the flow line (an arrow showing control passing between shapes) and the subroutine (a rectangle with double side lines — a call to a separate flowchart). Using the wrong shape (a decision inside a rectangle, for example) can cost the symbol mark (2024 s24 examiner report).

Start / Stop

Rounded rectangle — the terminator. Begins and ends every flowchart.

Total ← Total + 1

Rectangle — a process. Any calculation, assignment, or step that isn't input/output/decision.

INPUT Name

Parallelogram — input or output. INPUT reads from the user; OUTPUT displays to the screen.

Age ≥ 18 ?

Diamond — a decision. A Yes/No (True/False) question inside. Two arrows out, labelled.

📐 Design Studio — one problem, three views

The same algorithm shown three ways. Click any element in any view — the equivalent parts light up in the other two. This is how experienced programmers actually see code: as three overlapping mental models.

Structure diagram
Flowchart
Pseudocode
Click any element in any view to see how it maps to the others.

🔄 Life Cycle Stepper — the four stages walking through one problem

The problem: "Design a program that inputs 20 student scores, calculates the average, and outputs how many were above average." Click each stage below.

📝 Pseudocode — quick reference (syllabus style)

This is how pseudocode appears in the exam. The syllabus says the logic matters more than exact syntax, but where a question asks for pseudocode, program code (e.g. Python) scores no marks — except in the 15-mark scenario question. You'll practise the last few boxes in Topic 8.

DECLARE variables and constantsDECLARE Total : INTEGER DECLARE Name : STRING DECLARE Found : BOOLEAN CONSTANT MaxMark ← 100
INPUT, OUTPUT and assignmentINPUT Number Total ← Total + Number OUTPUT "The answer is ", Total
IF – THEN – ELSEIF Score >= 50 THEN OUTPUT "Pass" ELSE OUTPUT "Fail" ENDIF
CASE statementCASE OF Grade 'A' : OUTPUT "Excellent" 'B' : OUTPUT "Good" OTHERWISE OUTPUT "Try again" ENDCASE
FOR loop (count-controlled)FOR Count ← 1 TO 10 OUTPUT Count NEXT Count
WHILE loop (pre-condition)WHILE Password <> "cat" DO INPUT Password ENDWHILE
REPEAT loop (post-condition)REPEAT INPUT Number UNTIL Number >= 1 AND Number <= 100
Array declaration & access (Topic 8)DECLARE Scores : ARRAY[1:20] OF INTEGER Scores[1] ← 45 OUTPUT Scores[Index]
Procedure (Topic 8)PROCEDURE Greet(Name : STRING) OUTPUT "Hello ", Name ENDPROCEDURE CALL Greet("Ali")
Function (Topic 8)FUNCTION Square(Number : INTEGER) RETURNS INTEGER RETURN Number * Number ENDFUNCTION Answer ← Square(4)
MOD, DIV and LENGTH (Topic 8)Remainder ← MOD(17, 5) // 2 Whole ← DIV(17, 5) // 3 Size ← LENGTH("cat") // 3
File handling (Topic 8)OPENFILE "notes.txt" FOR READ READFILE "notes.txt", LineOfText CLOSEFILE "notes.txt"

🎯 Six mark-scheme traps (from the examiner reports)

Trap 1 · Validation with re-input written as a single IF

If the question asks you to validate the input and re-prompt until it is valid, the check must be inside a loop that keeps asking. An IF only checks once — examiners regularly see this.

Cited: 2025 s25 Q12, 2024 s24 Q12, 2025 w25 Q7(c)(ii)

Trap 2 · Verification described as "checks the data is sensible / true"

Verification checks the data has been entered or copied accurately — that it matches the original. It can't tell whether the original was true or sensible (checking data is sensible is validation). The syllabus checks are the visual check and the double entry check.

Cited: 2025 s25 Q1(a), examiner-report wording

Trap 3 · Program code instead of pseudocode

Where a question asks for pseudocode, solutions written in program code (e.g. Python's if:, while ... :) score no marks (syllabus). Use IF … THEN … ELSE … ENDIF, WHILE … DO … ENDWHILE, FOR … NEXT.

Cited: 2024 w24 examiner report — "many used program code or incorrect pseudocode which did not match the syntax of the pseudocode in the syllabus"

Trap 4 · Meaningless identifiers

Using Array, X, Data or Temp as variable/array names is flagged as "not meaningful". Names should describe what the variable holds: StudentScores, HighestScore, Counter. (Single letters are fine where conventional, such as i and j for array indexes.)

Cited: 2024 w24 Q9(c)

Trap 5 · Flowchart symbols used wrongly

Decisions go in diamonds, processes in rectangles, input/output in parallelograms, start/stop in rounded terminators, subroutine calls in double-sided rectangles. Putting a decision inside a rectangle, or a process inside a diamond, can cost the shape mark.

Cited: 2024 s24 examiner report — "correct flowchart symbols need to be used"

Trap 6 · Answering the wrong format

If a question says "using pseudocode", answer in pseudocode. If it says "using a flowchart", draw one. If it says "explain", write prose — pseudocode alone won't do. Match the format to the command word.

Cited: 2025 s25 general comments, 2024 s24 general comments
Path

Topic 7.1–7.6 Learning Journey

Mistakes

Mistakes log

Progress

Stats & graphs

0%Accuracy
0Answered
0Streak
Bookmarks

Bookmarks

My Notes

My Notes

Title
Note
Knowledge Vault 2.0

Knowledge Vault

Add entry

Category
Confidence
Title
Info

Entries

🎮 Drill 1 — Flowchart Symbol Identifier

A description is shown. Pick the correct flowchart symbol.

🎮 Drill 2 — Test Data Sorter

A value is shown for a whole number in the range 1–100. Is it normal, abnormal, extreme or boundary data? Some values fit two types — both are accepted.

🎮 Drill 3 — Validation Family

A rule is shown. Pick which validation check enforces it.

🎮 Drill 4 — Lifecycle Detective

A developer action is shown. Which stage of the life cycle is it?

🎮 Drill 5 — 60-Second Pseudocode Sprint

Rapid questions on pseudocode syntax — answer as many as you can in 60 seconds.

60
0 / 0

✎ Practice questions

📋 Exam Mode — real past-paper wording

Cambridge-style questions modelled on Paper 2 (2023–2025) and the examiner reports — the tag shows the paper each is based on. Type your answer, then mark it.

🔄 Traps — mark-scheme wording

Trap · Validation with re-input but no loop

If the question asks you to keep prompting until the input is valid, wrap the input in a loop. An IF only checks once.

2025 s25 · 2024 s24 · 2025 w25

Trap · "Verification checks data is sensible" ❌

Verification checks data has been entered or copied accurately (visual check, double entry check). Checking data is sensible is validation.

2025 s25 examiner report

Trap · Confusing validation with verification

Common in questions where one is asked for and candidates give the other. Read the question word carefully.

2025 s25 Q1, 2025 w25 Q6(c)

Trap · Python instead of pseudocode

Writing if x==5: is Python, and program code scores no marks where pseudocode is required. Write IF X = 5 THEN … ENDIF. Get the ENDs right — ENDIF, ENDWHILE, ENDCASE, ENDPROCEDURE, ENDFUNCTION.

2024 w24 examiner report

Trap · Meaningless variable names

"Array", "x", "temp", "data" — none are meaningful. Use names that describe the value: StudentScores, Counter, HighestMark.

2024 w24 Q9(c)

Trap · Missing NEXT / ENDWHILE

Every loop needs its closing keyword. Missing END markers is a common pseudocode error.

Recurring across 2023–2025 examiner reports

Trap · Decisions in rectangles

A flowchart decision must be a diamond. Putting a Yes/No question inside a rectangle loses the symbol mark.

2024 s24 examiner report — "correct flowchart symbols need to be used"

Trap · Wrong data type declared

Cambridge uses INTEGER, REAL, STRING, CHAR, BOOLEAN. Writing text or number is not accepted.

2025 s25 Q7

Trap · Skipping the parameter

When a procedure has a parameter, the CALL must pass a value: CALL Greet("Ali"), not CALL Greet.

2024 s24 Q3(b)

🧠 Memory triggers

ADCT

Four letters, four life-cycle stages.
Analysis → Design → Coding → Testing. Every life-cycle model contains these four.

NAEB

Four test-data types.
Normal (accepted) · Abnormal (rejected) · Extreme (largest/smallest accepted) · Boundary (each limit and the value just outside it).

RLFPTC

Six validation checks.
Range · Length · Format · Presence · Type · Check digit.

TPID + S

Flowchart symbols mapped to shapes.
Terminator = rounded rectangle · Process = rectangle · Input/Output = parallelogram · Decision = diamond · Subroutine = rectangle with double side lines. Arrows = flow lines.

VvV

Validation vs Verification.
Validation = data is sensible (automatic checks; loop to re-prompt). Verification = data entered or copied accurately (visual check, double entry check).

🏆 Skill grid

Green = secured (≥70%). Yellow = focus (below 70%). Grey = not attempted. Tap any badge to override.

➡️ Next up

When you've finished this lab, move on to 7.7–7.10 Algorithms & Debugging: linear search, bubble sort, totalling, counting, max/min/average, trace tables and finding errors.

✔ Saved