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

Q54 · 9618/22/M/J/25 Q1

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

Q549618/22/M/J/25original Q1Structured · 14 marks
Question 1 from 9618/22/M/J/25

Worked solution

(a)(i)

Write one point: the best life cycle depends on the project, for example its size, the team's skills, or whether requirements can change [1]

(a)(ii)

Write one point: which language suits the problem (here controlling a production line) [1]

(b)(i)

Any three reasons:

Requirements change for the production line [1]

New hardware or technology becomes available [1]

Library modules used change, or the law changes [1]

(b)(ii)

Write: perfective (or corrective) maintenance [1]

(c)

Work out the type of each result:

ExpressionData type
RIGHT(MachineCode, 4)STRING
Speed * 2.5REAL
NOT StatusBOOLEAN
IS_NUM(Check)BOOLEAN

STRING [1]

REAL [1]

BOOLEAN [1]

BOOLEAN [1]

(d)(i)

Product[x, y] has two indexes.

Write: 2 [1]

(d)(ii)

x has 100 values (0 to 99) and y has 10 values (0 to 9). 100 × 10 = 1000 [1]

(d)(iii)

Use the bounds and the type for a whole number:

DECLARE Product : ARRAY[0:99, 0:9] OF INTEGER

Correct bounds [0:99, 0:9] [1]

The rest of the declaration (DECLARE, name, ARRAY ... OF INTEGER) [1]

KEY IDEAMatch data types to what an expression gives back, and count array elements by multiplying the sizes of the dimensions.
TOTAL 14 marks

Official mark scheme

Mark scheme for 9618/22/M/J/25 question 1
VIDEO
▶ Whole paper

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