Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 2 of 3.
A structure chart shows how a program is split into modules and how they connect. Write both of these points:
It shows the relationships between modules (the hierarchy, and any selection or repetition), or how a problem is broken down into sub-tasks [1]
It shows the parameters passed between modules, or whether each module is a function or a procedure [1]
Draw four boxes. Put Section_1 at the top. Put Sub1_A, Sub1_B and Sub1_C in a row underneath. Join Section_1 to each of the three with a line:
Four boxes labelled Section_1, Sub1_A, Sub1_B and Sub1_C, with Section_1 joined to the other three [1]
On the line to Sub1_A: arrows pointing down for the two parameters, XT and PB, each with an open circle (data going in) [1]
On the line to Sub1_B: a down arrow with an open circle for the parameter RA, and an up arrow with a filled circle for the returned Boolean value [1]
On the line to Sub1_C: a down arrow with an open circle for SB, and a two-way arrow for SA (because it is BYREF, it goes in and comes back out) [1]
A selection diamond where the lines leave the bottom of Section_1, because only one of the three modules is called each time [1]
▶ 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.