Objects and classes form the basic structure of Object-Oriented Programming (OOP).
- (a)Outline the structure of a class.[3]
- (b)Give three differences between an object and a class.[3]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2024). The mark or mark type is shown in brackets.
- [3] One mark per mark point (Max 3)
- [3] MP1 Attributes/properties ...
- [3] MP2 ... with their data types // ... are variables bound to the class
- [3] MP3 Methods ...
- [3] MP4 ... that are subroutines / functions / procedures that act upon the attributes
- [3] MP5 Getters/setters ...
- [3] MP6 ... are methods that can fetch / update the contents of attributes
- [3] MP7 A constructor ...
- [3] MP8 ... that is used to create instances / objects of this class.
- [3] One mark per mark point (Max 3)
- [3] MP1 A class is only defined once but many objects can be created from that class // A class is a template / blueprint from which objects are created // An object is an instance of a class
- [3] MP2 No memory is allocated when a class is defined, but objects are allocated memory space whenever they are created
- [3] MP3 A class cannot be manipulated as it is not available in the memory, but objects can be manipulated
- [3] MP4 A class is defined but an object is declared / created / instantiated.
- [3] MP5 A class can use inheritance. An object cannot.
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 →