Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 2 of 3.
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.
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]
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]
▶ 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.