9618/22/M/J/25 question 1: worked solution (May/June 2025, paper 22)
Show as plain textHide plain text
Cambridge AS Level Computer Science 9618 · 12.3 Program Testing and Maintenance Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 3 of 3. Q54 9618/22/M/J/25 original Q1 Structured · 14 marks 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: Expression Data type RIGHT(MachineCode, 4) STRING Speed * 2.5 REAL NOT Status BOOLEAN 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 IDEA Match 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 VIDEO ▶ Whole paper Video solution of the whole paper · by Awab Aqib. Tap the picture to open it on YouTube.