IGCSE Computer Science - Algorithm Design & Problem-Solving | PDLC, Algorithms, Testing
Chapter 7 ยท Paper 2

Algorithm Design & Problem-Solving

PDLC, decomposition, design tools, standard algorithms, validation, trace tables and testing.

Based on Cambridge IGCSE / O-Level CS Syllabus 0478/2210 (2026โ€“2028)

1 Program Development Life Cycle (PDLC)

The PDLC is a four-stage framework used to develop software in a structured and manageable way.

Stage 1
Analysis
  • Abstraction โ€” remove irrelevant detail
  • Decomposition โ€” break into sub-problems
  • Identify inputs, processes, outputs, storage
  • Define requirements clearly
Stage 2
Design
  • Structure diagrams
  • Flowcharts
  • Pseudocode
  • Plan before coding
Stage 3
Coding
  • Write program code
  • Use Python / VB.NET / Java
  • Iterative testing during coding
  • Fix bugs as they appear
Stage 4
Testing
  • Test with normal, boundary, extreme, abnormal data
  • Verify all requirements are met
  • Document results

2 Decomposition & Abstraction

Abstraction
  • Remove unnecessary detail from a problem
  • Focus only on what is relevant to solving it
  • Example: a map ignores buildings, shows roads
  • Makes complex problems simpler to model
Decomposition
  • Break a large problem into smaller sub-problems
  • Each sub-problem is solved independently
  • Sub-solutions combine to form the full solution
  • Makes large problems manageable

IPO โ€” Inputs, Processes, Outputs & Storage

ComponentDescriptionExample (Grade Calculator)
InputsData entered into the systemStudent name, exam scoreProcessesOperations performed on inputsOutputsResults producedStorageData saved for later use

3 Design Tools

Flowchart Symbols

SymbolShapePurpose
TerminatorProcessDecisionInput/OutputSubroutineFlow line

Always use a parallelogram for INPUT and OUTPUT โ€” not a rectangle. Using the wrong shape will lose marks.

4 Standard Algorithms

Checks each element one by one from start to end until the target is found or the list is exhausted.

Pseudocode
Found โ† FALSE
Index โ† 1
WHILE Index <= Length AND Found = FALSE DO
    IF List[Index] = Target
      THEN
        Found โ† TRUE
      ELSE
        Index โ† Index + 1
    ENDIF
ENDWHILE
IF Found = TRUE
  THEN OUTPUT "Found at: ", Index
  ELSE OUTPUT "Not found"
ENDIF

Repeatedly compares adjacent pairs and swaps them if out of order. Larger values "bubble" to the end.

Pseudocode
DECLARE Swapped : BOOLEAN
DECLARE Temp : INTEGER
REPEAT
    Swapped โ† FALSE
    FOR i โ† 1 TO Length - 1
        IF List[i] > List[i+1]
          THEN
            Temp โ† List[i]
            List[i] โ† List[i+1]
            List[i+1] โ† Temp
            Swapped โ† TRUE
        ENDIF
    NEXT i
UNTIL Swapped = FALSE
Pseudocode โ€” common patterns
// Totalling
Total โ† 0
FOR i โ† 1 TO n
    Total โ† Total + List[i]
NEXT i

// Counting (values > 50)
Count โ† 0
FOR i โ† 1 TO n
    IF List[i] > 50 THEN Count โ† Count + 1
NEXT i

// Max value
Max โ† List[1]
FOR i โ† 2 TO n
    IF List[i] > Max THEN Max โ† List[i]
NEXT i

Average โ† Total / n

5 Validation & Verification

Validation CheckPurposeExample
Range checkValue must be within set limitsLength checkString must have correct number of charactersType checkData must be the correct typePresence checkField must not be emptyFormat checkData must match a specific patternCheck digit
Verification CheckDescription Visual check} -- Double entry} --

Validation checks data is reasonable (automated). Verification checks data was entered correctly. They are different โ€” do not confuse them.

6 Test Data

TypeDescriptionExample (score 0โ€“100)
Normal} --
Boundary} --
Extreme} --
Abnormal} --

Extreme data = largest/smallest accepted value. Boundary data also includes the first rejected value just outside the range. Related but not identical.

7 Trace Tables

A trace table (dry run) documents the value of every variable and output at each step of an algorithm, used to verify logic manually.

Algorithm to trace
x โ† 1
y โ† 10
WHILE x < 4 DO
    y โ† y - x
    x โ† x + 1
ENDWHILE
OUTPUT y
Stepxyx < 4?Output
StartIteration 1Iteration 2Iteration 3Check

8 Identifying Errors

Error TypeDescriptionExample
Syntax error} --
Logic error} --
Runtime error} --
Scroll to Top