9618/23/M/J/23 question 7: worked solution (May/June 2023, paper 23)
Show as plain textHide plain text
Cambridge AS Level Computer Science 9618 · 12.2 Program Design Worked solution from the Software Development Paper 2 Problem-solving and Programming booklet, Part 2 of 3. Q19 9618/23/M/J/23 original Q7 Structured · 8 marks 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 IDEA Abstraction 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 VIDEO ▶ Whole paper Video solution of the whole paper · by Zafar Ali Khan (ZAK). Tap the picture to open it on YouTube.