Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 2 of 3.
A curved arrow means a loop.
It shows iteration (repetition) [1]
Module-A() repeatedly calls Sub-Y1(), then Sub-Y2(), then Sub-9() in that order [1]
The record holds the two parameters and the returned Boolean value.
TYPE MyType
DECLARE RA : INTEGER
DECLARE RB : STRING
DECLARE RC : BOOLEAN
ENDTYPETYPE MyType ... ENDTYPE structure [1]
RA declared as INTEGER and RB declared as STRING [1]
A third field declared as BOOLEAN [1]
The procedure changes the record, so the parameter is passed by reference.
PROCEDURE Sub-9(BYREF Param : MyType)
BYREF used [1]
The rest of the header correct: PROCEDURE Sub-9, a parameter name and type MyType [1]
▶ Starts at Q7 (1:42:39)
Starts at Q7 (1:42:39) · by Zafar Ali Khan (ZAK). 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.