Cambridge AS Level Computer Science 9618 · 12.2 Program Design

Q19 · 9618/23/M/J/23 Q7

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

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

Worked solution

(a)(i)

Write: to filter out information that is not needed, so only the essential information is kept for the problem [1]

(a)(ii)

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]

(a)(iii)

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.

(b)

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)

KEY IDEAAbstraction keeps only what the task needs, and a structure chart shows each module's calls with its parameters and return values.
TOTAL 8 marks

Official mark scheme

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