Note AcademyNote Academy

Computer Science · May / June 2019 · Paper 2 SL · Question 11

Adapt for 2027Method scope in separate classes, inheritance and method overriding are covered in B3.1 and B3.2. Its main topic (B3.2) is Higher Level only in 2027; Standard Level students can do only the part on B3.1.

IBCS

As printed in the paper

The question as text

11. A generic Event class is defined as follows: class Event { private String eventID; private int numberOfRaces; private Race[] races; private Race finals; public Event(String ID, int numberOfRaces) { eventID = ID; races = new Race[numberOfRaces]; for(int i = 0; i < numberOfRaces; i++) { races[i] = new Race(); } finals = new Race(); } public void addSwimmers() { // fills the qualifying heats with swimmers } public void fillFinals() { // fills the finals race with the best 8 from the qualifying heats } // more methods() }

Read automatically from the paper; the printed page above is exact.

Show the answer and mark scheme
  • 11(a)[3]

  • 11(b)[4]

  • 11(c)[2]

Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.