Computer Science · May / June 2016 · Paper 2 HL · Question 17
IBCS
As printed in the paper
The question as text
17. Clients can book over the internet and are allocated a room on arrival. When a booking is made, a Client object is added to a linked list, Bookings, which is linked in order of the client’s arrival time, stored in arrive. If any Client objects have the same arrival date they are ordered so that the most recently added object will appear first in the linked list. The Dates class contains two methods to compare dates: • public static Dates compareDate(Dates x, Dates y) which returns the earlier of the two dates • public static Boolean equalDate(Dates x, Dates y) which returns true if the dates are the same. In answering parts (a) and (b), you should use the methods of the LinkedList class.
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
17(a)[6]
17(b)[6]
17(c)[4]
17(d)[4]
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

