Skip to main content
A-LevelComputer ScienceFurther programming9618/31 · Oct/Nov 2022 · Q118 Marks

Define these Object-Oriented Programming (OOP) terms: Instance Inheritance Polymorphism

  1. (a)Define these Object-Oriented Programming (OOP) terms: Instance Inheritance Polymorphism[3]
  2. (b)In OOP, a class contains attributes and methods. Complete the pseudocode for the class Car to enable objects to be created. The class needs to include: • string attributes to store the make, model, body type and fuel type • an integer attribute to store the number of cars of that type built. The attributes must be available only through the methods of the class. CLASS PRIVATE Make : STRING PRIVATE PUBLIC PROCEDURE New (CarMake : STRING, Make ← Model ← BodyType ← CarBodyType Fuel ← "" NumberBuilt ← 0 ENDPROCEDURE GetFuel () GetNumberBuilt() .)[5]

Mark scheme

Marking points from the official mark scheme (Oct/Nov 2022). The mark or mark type is shown in brackets.

  1. [3] One mark for each correct OOP term definition:
  2. • Instance – an occurrence of an object // a specific object based on the class // an instantiation of a class.
  3. • Inheritance - the capability of defining a new class of objects that has all the attributes and methods from a parent class.
  4. • Polymorphism – allows the same method to take on different behaviours depending on which class is instantiated // methods can be redefined for derived classes.
  5. [5] One mark for each point:
  6. • Car and ENDCLASS
  7. • Four declarations – must use the identifiers used in the assignments
  8. • Constructor header – must use CarBodyType
  9. • Two assignments – must use CarMake
  10. • Constructor identifier for the car model and the identifier in the Model assignment statement match
  11. CLASS Car PRIVATE Make : STRING PRIVATE Model : STRING PRIVATE BodyType : STRING PRIVATE Fuel : STRING PRIVATE NumberBuilt : INTEGER PUBLIC PROCEDURE NEW (CarMake : STRING, CarModel : STRING, CarBodyType : STRING) Make ← CarMake Model ← CarModel BodyType ← CarBodyType Fuel ← "" NumberBuilt ← 0 ENDPROCEDURE getFuel() getNumberBuilt() ENDCLASS

Write your answer and get it marked

On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.

Sign up free →

About this question

Topic
Further programming, A-Level Computer Science (syllabus 9618). Structured question, 8 marks.
Source
A-Level Computer Science, Oct/Nov 2022 Paper 3 Variant 1, question 11.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep