Skip to main content
A-LevelComputer ScienceFurther programming9618/31 · Oct/Nov 2024 · Q96 Marks

A veterinary surgery wants to create a class for individual pets. Some of the attributes required in the class are listed in the table. [Figure X.X - table]

  1. (a)State one reason why the attributes would be declared as PRIVATE.[1]
  2. (b)Complete the class diagram for Pet, to include: • an attribute and data type for the name of the pet • an attribute and data type for the name of the owner • a method to create a Pet object and set attributes at the time of registration • a method to assign a pet ID • a method to assign the date of registration • a method to return the pet name • a method to return the owner's telephone number. [Figure X.X - class diagram template][5]

This question uses a diagram from the original paper, which isn't shown here. Open the full paper from the past papers archive to see it.

Mark scheme

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

  1. 9(a) To ensure that the attributes are only accessible using the class's own methods/within the class.
  2. 9(b) One mark per mark point (Max 5)
  3. 9(b) MP1 Two correct attributes with sensible names and correct data types.
  4. 9(b) MP2 Constructor present.
  5. 9(b) MP3 Two correct setters with exact names and appropriate parameters and data types.
  6. 9(b) MP4 Two correct getters with appropriate names.
  7. 9(b) MP5 Name assigned to pet name getter matches the attribute.
  8. 9(b) Pet PetID : STRING PetType : STRING OwnerTelephone : STRING DateRegistered : DATE PetName : STRING OwnerName : STRING Constructor() SetPetID(APetID : STRING) SetDateRegistered(RegDate : DATE) GetPetName() GetOwnerTelephone()

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, 6 marks.
Source
A-Level Computer Science, Oct/Nov 2024 Paper 3 Variant 1, question 9.

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