Computer Science · May / June 2024 · Paper 2 SL · Question 10
Adapt for 2027Objects, accessors, mutators and constructors are B3.1, and writing the Car subclass uses inheritance (B3.2.1). Includes Higher Level only content, which Standard Level students do not study.
IBCS
As printed in the paper
The question as text
10. A car rental company has offices in cities in Spain and Portugal. It manages its cars as a large, unsorted collection of rental objects that is accessed by a Java program. The following UML diagram describes the current main Rental class. Fuel type and transmission type were chosen to be Boolean because they have two choices: petrol or diesel for fuel type, and manual or automatic for transmission type. The brand and the model of the car are stored together as one string brandModel. Typically the company has many cars of the same brand and model. Rental example Rental object - numberPlate: String - brandModel: String - year: integer - rentalClass: char - pricePerDay: real - fuelType: boolean - transmissionType: boolean 9876 BMW Citrault Polo 2018 B 28.78 true false + default constructor + accessor and mutator methods
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
10(a)[2]
10(b)[1]
10(c)[3]
10(d)[2]
10(e)[2]
10(f)[1]
10(g)[3]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

