Worked solution from the Algorithm Design and Problem-solving Paper 2 Problem-solving and Programming booklet, Part 1 of 2.
Abstraction means keeping only the data that is needed for the task and leaving out the data that is not needed (filtering out unnecessary detail). [1]
Write four items that must be stored for each hire, for example:
Car registration (or car ID or car type) and customer name (or customer ID, address or licence details) [1]
Start date of the hire and return date (or number of days) [1]
Another correct item is the cost of the hire. Any four different items from these lists score, two items per mark.
Write two operations, for example:
Input customer details (or car details or payment details) [1]
Create the hire (or return the car, change the car status, cancel the hire, or calculate the hire cost / process the payment) [1]
▶ Whole paper
Video solution of the whole paper · 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.