Cambridge AS Level Computer Science 9618 · 12.2 Program Design

Q17 · 9618/21/M/J/23 Q7

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

Q179618/21/M/J/23original Q7Structured · 8 marks
Question 7 from 9618/21/M/J/23

Worked solution

(a)

Decomposition splits the job into smaller modules. Write any three, each with its name and use:

GetOverdueLoan() identifies a book that is overdue [1]

GetStudentEmail() gets the email address of the student with the overdue book [1]

CreateEmail() (or SendEmail()) generates (or sends) the email to that student [1]

IdentifyStudent(), which finds the student with an overdue book, is also accepted.

(b)(i)

Module-A calls the other three modules (B, C and D). [1]

The call is made again and again: the curved arrow on the chart shows repetition. [1]

(b)(ii)

Draw Module-D at the top with a selection diamond under it. Draw Module-X and Module-Y underneath, each joined to the diamond:

All three rectangles labelled Module-D, Module-X and Module-Y, and joined correctly [1]

On the line to Module-Y only: two down arrows with open circles (the string and the real number) and one up arrow with a filled circle (the returned Boolean). Nothing on the line to Module-X, which has no parameters [1]

A selection diamond under Module-D, because it calls either X or Y [1]

KEY IDEAA structure chart shows each module's callers, with a diamond for selection, a curved arrow for repetition and arrows for data passed.
TOTAL 8 marks

Official mark scheme

Mark scheme for 9618/21/M/J/23 question 7
VIDEO
▶ Starts at Q7 (51:35)

Starts at Q7 (51:35) · by Pseudocode Pro. 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.