Algorithm Design and Problem Solving · 4 question types
Past paper frequency (2018 to 2024)
This topic accounts for approximately 6% of your exam marks.
Decomposition, abstraction and structure charts appear as design-focused questions.
Test data is a carefully chosen set of inputs used to check that a program works correctly.
Different kinds of test data probe different parts of the program's behaviour. The syllabus names four categories.
Normal data is data that the program should accept because it is within the expected, valid range.
For a program that accepts ages from 12 to 18:
Normal data shows that the program does what it is supposed to do for typical input.
Boundary data tests the edges of the valid range, including the values immediately inside and immediately outside.
For ages 12 to 18, the boundary tests are:
Boundary data is where bugs often hide: many off-by-one errors only show up at the very edge of the valid range. Always test the four values around each boundary.
Extreme data tests the smallest and largest values that should still be accepted.
For ages 12 to 18, the extremes are 12 and 18: the valid endpoints. (Some specifications treat extreme and boundary as synonyms; for CIE they are slightly different, with extreme being the largest/smallest valid values and boundary including both sides.)
Abnormal data (also called erroneous or invalid data) is data that the program should reject because it is the wrong type, format, or simply outside the valid range.
For an age field, abnormal data might include:
"F" (a letter, wrong type).-5 (negative, impossible).200 (far outside the valid range)."" (empty input)."@" (a symbol).A well-written program does not crash on abnormal input; it shows an error message and asks the user to try again.
Example — A program accepts orders priced strictly below $10.00. The tester chooses $10.00, $9.99 and the string "ten" as test inputs. Classify each value and predict the program's response.
| Value | Category | Expected behaviour |
|---|---|---|
| $10.00 | Boundary (just at the rejected end) | Rejected; the requirement is "less than $10.00", so $10.00 is out of range |
| $9.99 | Boundary and extreme (largest accepted value) and normal | Accepted; sits inside the valid range |
| "ten" | Abnormal (wrong type: a word, not a number) | Rejected; the program should not accept text in a numeric field |
A complete test plan picks at least one value from every category for every input field. This gives confidence that the program works for typical inputs and handles invalid inputs gracefully.