Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 2 of 3.
Write: to filter out information that is not needed, so only the essential information is kept for the problem [1]
Choose one item that is used and one that is not, and give a reason for each.
Required: student email address (or student name, return / issue date, book title) - the email must be sent to the student and say which book is overdue [1]
Not required: home address (or date of birth, tutor, subject choices, library location, category, author) - it is not needed to send an email about an overdue book [1]
Any two operations that happen when the book comes back:
Clear the loan / record that the book has been returned / update the loan history [1]
Remove the student's block so they can borrow books again [1]
Sending an acknowledgement to the student is also accepted.
Overlay() is at the top and calls Module-X() and Module-Y(). Reset() is below Module-X() and Replace() is below Module-Y(). Write the names in the boxes, then add the arrows (open circle = data, filled circle = flag). The arrow down from Overlay() to Module-Y() and the arrows up from Reset() and Replace() are already drawn. Write any three of these four points (only three carry a mark):
Names Overlay, Module-X, Module-Y, Reset and Replace in the right boxes, all joined correctly [1]
Module-X() / Reset(): add an arrow down for TA (data); the arrow up is the integer returned (data) [1]
Module-Y() / Replace(): add arrows down for RA (data) and RB (flag); the arrow up is the Boolean returned (flag) [1]
Overlay() / Module-Y(): the arrow down is SA (data); add an arrow up for RA (data), because it is BYREF (also accepted, but any three only)
▶ Whole paper
Video solution of the whole paper · by Zafar Ali Khan (ZAK). 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.