Cambridge AS Level Computer Science 9618 · 9.1 Computational Thinking Skills

Q4 · 9618/21/O/N/22 Q2

Worked solution from the Algorithm Design and Problem-solving Paper 2 Problem-solving and Programming booklet, Part 1 of 2.

Q49618/21/O/N/22original Q2Structured · 5 marks
Question 2 from 9618/21/O/N/22

Worked solution

(a)

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.

(b)

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]

KEY IDEAAbstraction keeps only the details needed for the job; for a hire system that means car, customer, dates and cost.
TOTAL 5 marks

Official mark scheme

Mark scheme for 9618/21/O/N/22 question 2
VIDEO
▶ 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.