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.
Verification is a check that the data entered into the system matches the data that was intended.
Validation asks "Is this input sensible?" Verification asks "Did the user actually mean to type this?"
Two common verification methods:
The user enters the same value twice; the program checks that the two entries match.
Example — When setting a new password, the user is asked to type it once and then again in a second box. If the two entries differ, the password is rejected.
Pseudocode:
INPUT password
INPUT confirm_password
WHILE password <> confirm_password DO
OUTPUT "Passwords do not match"
INPUT password
INPUT confirm_password
ENDWHILE
The system displays the entered data back to the user and asks them to confirm it is correct before continuing.
Example — At an online checkout, after the user types in their delivery address, the page shows the address back and asks "Is this correct?" with Yes/No buttons.
| Validation | Verification | |
|---|---|---|
| What it asks | Is the input plausible / sensible? | Did the user actually mean to type this? |
| Performed by | The program (automatically), based on rules | The user (with a prompt from the program) |
| Methods | Range, length, type, presence, format, check digit | Double-entry, visual check |
| Catches | Invalid types, blank fields, out-of-range values, typos in formatted codes | Typing the wrong but plausible value (e.g. wrong email address) |
| Limit | Can confirm input is sensible, not that it is correct | Can confirm the user typed what they meant, but not that the meaning is right |