Cambridge O Level Computer Science 2210 · 7.6 Suitable test data

Q41 · 2210/23/O/N/24 Q7

Worked solution from the Algorithm design and problem-solving Paper 2 Algorithms, Programming and Logic booklet, Part 5 of 8.

Q412210/23/O/N/24original Q7Structured · 9 marks
Question 7 from 2210/23/O/N/24

Worked solution

Three types of test data for the range check 1 to 100:

Type 1: normal data [1]

Example: 25 (any value from 2 to 99) [1]

Outcome: accepted [1]

Type 2: extreme data (the largest and smallest acceptable values) [1]

Example: 1 or 100 [1]

Outcome: accepted [1]

Type 3: abnormal data (not allowed) [1]

Example: 125 (or 0, -5) [1]

Outcome: rejected [1]

Boundary data also scores as a type: for example 1 and 0, or 100 and 101, where the first is accepted and the second is rejected.

KEY IDEANormal data is accepted, extreme data is the largest or smallest accepted value, and abnormal data is rejected.
TOTAL 9 marks

Official mark scheme

Mark scheme for 2210/23/O/N/24 question 7
VIDEO
▶ Topic lesson

A lesson on this topic · by Craig'n'Dave. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.