User interface language: English | Español

Date November 2019 Marks available 2 Reference code 19N.2.SL.TZ0.11
Level SL Paper 2 Time zone no time zone
Command term Define Question number 11 Adapted from N/A

Question

The supermarket chain wants to use this OOP simulation to experiment with different ways of organizing their check-out system. For example, it is possible to have different check-out counters such as cash-only or card only, or to have check-out counters for ten items or fewer.

It is also possible to have one line that serves a number of check-out counters.

Define the term inheritance.

[2]
a.

Explain one advantage of the OOP feature “inheritance” with reference to this scenario.

[3]
b.

Describe two advantages of using libraries of classes.

[4]
c.

Outline two reasons why the use of multiple programming teams in different locations may be problematic when developing an integrated software solution.

[4]
e.

Markscheme

Award [2 max] 
A new class is derived from an existing class;
The new class inherits all variables/data/properties and methods/behaviours of the other class;
The derived class is called a subclass/child, and the original is called a superclass/parent; 

a.

Award [3 max] 
Award [1] for an advantage;
Award [1] for some elaboration;
Award [1] for a reference to the context;

Note: to a certain extent mixing and matching can take place

It promotes code reuse;
because the superclass POSline;
holds common data and actions that are shared by all newly developed classes;

It reduces maintenance overhead;
because you only have to update the superclass;
in this case POSline;

allows extensibility / ability to create other classes easily;
specific types of check-out can be created;
reducing development time / costs / testing;

b.

Award [4 max] 
Saves development time;
Since classes and their methods do not need to be rewritten;

Promotes abstraction;
Because reusable code exists that functions without knowledge of internal working;

Libraries contain error-free / robust code;
because it has been used and tested many times;

Promotes efficiency / organization;
As code will be shorter / easier to read / develop;

Familiarity with libraries;
Allow for easier maintenance / modification;

Mark as [2] and [2].

c.

Award [4 max]. Mark as 4 separate points.
Teams may be located in different countries;
therefore have communication issues;
due to different languages;
or different time zones;
inability to discuss face-to-face;
Problems with different conventions (e.g. date format);
Managing the teams in different locations may be problematic (allow example);
Teams may not collaborate well due to personality issues;
Development time might increase;
Due to time lags between communications;

e.

Examiners report

15(a)-(e) dealt with more general aspects of OOP. Candidates should look carefully at the wording in each question as to whether an explanation or description is required and at the number of examples/reasons etc. that are requested, as these aspects affect the way they should answer.

Part (a) was a straight-forward definition.

a.

(b) asked for an explanation related to the scenario described. It should be clear from this type of question that full marks cannot be achieved if the scenario is not considered.

b.

Candidates generally answered the question on libraries well. Clearly candidates who have had extensive practical experience of coding with libraries would have been better prepared for this type of question.

c.

The candidates generally came up with at least one appropriate reason.

e.

Syllabus sections

Option D: Object-oriented programming » D.2 Features of OOP
Option D: Object-oriented programming

View options