9618/22/M/J/22 question 3: worked solution (May/June 2022, paper 22)

Show as plain text

Cambridge AS Level Computer Science 9618 · 12.2 Program Design Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 2 of 3. Q14 9618/22/M/J/22 original Q3 Structured · 9 marks Worked solution (a)(i) Head() calls three modules in order and repeatedly, so draw an iteration arc across its three lines. Add the missing parameters: Mod_V takes an INTEGER and Mod_Z takes a REAL. Iteration arc drawn across the three lines from Head() (A) [1] Parameter arrow (open circle) going down on the line from A to D, for the INTEGER passed to Mod_V [1] Parameter arrow (open circle) going down on the line from D to E, for the REAL passed to Mod_Z [1] (a)(ii) Match the boxes to the headers. B has one down parameter, so Mod_W. C has a parameter passed both ways (BYREF), so Mod_X. D returns a flag (BOOLEAN), so Mod_V. E returns data, so Mod_Z. F has two parameters down, so Mod_Y. Label Module name A Head B Mod_W C Mod_X D Mod_V E Mod_Z F Mod_Y Any two rows correct [1] Four rows correct [1] All six rows correct [1] (b) Any three benefits: A complex problem is easier to understand and solve when it is broken into smaller problems [1] Smaller modules are easier to program, test and maintain [1] Sub-problems can be given to different programmers or teams and solved separately [1] KEY IDEA In a structure chart, arrows show parameters and return values, a flag shows a BOOLEAN result and an arc shows repetition. TOTAL 9 marks Official mark scheme VIDEO ▶ Whole paper Video solution of the whole paper · by Awab Aqib. Tap the picture to open it on YouTube.