Cambridge AS Level Computer Science 9618 · 12.3 Program Testing and Maintenance

Q38 · 9618/23/M/J/22 Q4

Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 3 of 3.

Q389618/23/M/J/22original Q4Structured · 4 marks
Question 4 from 9618/23/M/J/22

Worked solution

Test the boundaries of the 150 to 155 range, and values clearly outside it. Any four of these rows score:

Type of test dataExample test valueExpected return valueExplanation
AbnormalAny value below 149"FAIL"Outside the acceptable range, too small
Boundary (abnormal)149"FAIL"Largest value that is not acceptable
Boundary (normal)150"PASS"Smallest acceptable value
Boundary (normal)155"PASS"Largest acceptable value
Boundary (abnormal)156"FAIL"Smallest value that is not acceptable
AbnormalAny value above 156"FAIL"Outside the acceptable range, too large

Each correct row (example value, expected result and explanation all fit) earns 1, up to four rows [4]

The example row already given (153, "PASS") does not score again.

KEY IDEAGood test data covers normal values, the values on each boundary, and values just outside the boundaries.
TOTAL 4 marks

Official mark scheme

Mark scheme for 9618/23/M/J/22 question 4
VIDEO
▶ Whole paper

Video solution of the whole paper · by Digify ID. 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.