Cambridge AS Level Computer Science 9618 · 12.2 Program Design

Q15 · 9618/23/M/J/22 Q3

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

Q159618/23/M/J/22original Q3Structured · 7 marks
Question 3 from 9618/23/M/J/22

Worked solution

(a)

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]

(b)

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]

KEY IDEAA structure chart shows the modules, which one calls which, and the data passed in and out of each.
TOTAL 7 marks

Official mark scheme

Mark scheme for 9618/23/M/J/22 question 3
VIDEO
▶ 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.