Skip to main content
A-LevelComputer ScienceFurther programming9618/42 · May/June 2025 · Q326 Marks

A program stores data about animals using Object-Oriented Programming (OOP). The class Animal stores the data about animals. Animal Name : String Sound: String Size : Integer Intelligence : Integer Constructor() Description() stores the name of the animal stores the sound the animal makes stores the size of the animal as an integer between 1 (smallest) and 10 (largest) stores the intelligence of the animal as an integer between 1 (least) and 10 (most) initialises all attributes to its parameter values returns a string message that contains the data from the attributes

  1. (a)(i)Write program code to declare the class Animal and its constructor. Do not declare the other methods. Use your programming language appropriate constructor. If you are writing in Python, include attribute declarations using comments. Save your program as Question3_J25. Copy and paste the program code into part 3(a)(i) in the evidence document.[4]
  2. (a)(ii)The method Description() creates and returns a string of the animal's data in the format: "The animal's name is <Name> ", it makes a " <Sound> ", its size is " <Size> " and its intelligence level is " <Intelligence> For example: The animal's name is Teddy, it makes a Bark, its size is 4 and its intelligence level is 6 Write program code for Description() Save your program. Copy and paste the program code into part 3(a)(ii) in the evidence document.[3]
  3. (b)(i)The class Parrot inherits from the class Animal Parrot inherits the attributes from Animal and overrides the Description() method. The additional attributes and methods in the class Parrot are: Parrot WingSpan : Integer NumberWords : Integer Constructor() ChangeNumberWords() the width of the parrot's wings to the nearest cm the number of words the parrot can speak calls the parent constructor using its parameter values; initialises WingSpan and NumberWords to its parameter values takes an integer parameter and adds this to the number currently in NumberWords (i) Write program code to declare the class Parrot, its constructor and the method ChangeNumberWords() Use your programming language appropriate constructor. If you are writing in Python, include attribute declarations using comments. Save your program. Copy and paste the program code into part 3(b)(i) in the evidence document.[4]
  4. (b)(ii)The method Description() in the class Parrot creates and returns a string of the animal's data in the format: "The animal's name is <Name> ", it makes a " <Sound> ", its size is " <Size> " and its intelligence level is " <Intelligence> ". It has a wingspan of " <WingSpan> "cm and can say " <NumberWords> " words." For example: The animal's name is Chewie, it makes a Squawk, its size is 1 and its intelligence level is 10. It has a wingspan of 30cm and can say 29 words. Write program code for Description() Save your program. Copy and paste the program code into part 3(b)(ii) in the evidence document.[2]
  5. (c)(i)The class Wolf inherits from the class Animal Wolf inherits the attributes from Animal and overrides the Description() method. The additional attributes and methods in the class Wolf are: Wolf TerritorySize : Integer Constructor() SetTerritorySize() stores the size of the area where the wolf lives, to the nearest square mile calls the parent constructor using its parameter values; initialises TerritorySize to its parameter value takes an integer parameter and adds this to the number currently in TerritorySize (i) Write program code to declare the class Wolf, its constructor and the method SetTerritorySize() Use your programming language appropriate constructor. If you are writing in Python, include attribute declarations using comments. Save your program. Copy and paste the program code into part 3(c)(i) in the evidence document.[4]
  6. (c)(ii)The method Description() in the class Wolf creates and returns a string of the animal's data in the format: "The animal's name is <Name> ", it makes a " <Sound> ", its size is " <Size> " and its intelligence level is " <Intelligence> ". Its territory is " <TerritorySize> " square miles." For example: The animal's name is Nighteyes, it makes a Howl, its size is 8 and its intelligence level is 7. Its territory is 100 square miles. Write program code for Description() Save your program. Copy and paste the program code into part 3(c)(ii) in the evidence document.[2]
  7. (d)(i)The main program declares instances of the classes for three animals: • A parrot with the name 'Chewie'; it makes a 'Squawk' sound. Its size is 1, intelligence is 10, wingspan is 30 cm and it can say 29 words. • A wolf with the name 'Nighteyes'; it makes a 'Howl' sound. Its size is 8, intelligence is 7 and its territory is 100 square miles. • An animal that is a horse with the name 'Copper'; it makes a 'Neigh' sound. Its size is 10 and its intelligence is 6. Write program code for the main program. Save your program. Copy and paste the program code into part 3(d)(i) in the evidence document.[2]
  8. (d)(ii)The main program also needs to: • decrease the territory for the wolf Nighteyes by 20 square miles • increase the number of words the parrot Chewie can say by 2 words • output the description for all three animals. Write program code to extend the main program. Save your program. Copy and paste the program code into part 3(d)(ii) in the evidence document.[3]
  9. (d)(iii)Test your program. Take a screenshot of the output(s). Save your program. Copy and paste the screenshot into part 3(d)(iii) in the evidence document.[2]

Mark scheme

Marking points from the official mark scheme (May/June 2025). The mark or mark type is shown in brackets.

  1. [1] Class header (and end when appropriate)
  2. [1] Four attributes with appropriate data types
  3. [1] Constructor header (and end where appropriate) within class taking (min) 4 parameters ...
  4. [1] ... assigning each parameter to its attribute
  5. [1] Description () method header (and end where appropriate) with no parameter
  6. [1] Concatenating the attributes with the given message ...
  7. [1] ... and returning the created message
  8. [1] Class header (and end where appropriate) inherits from Animal
  9. [1] Constructor header (and end where appropriate) taking 6 parameters within class and calling parent constructor with the four parameters ...
  10. [1] ... WingSpan and NumberWords attributes defined with data types and parameters assigned within constructor
  11. [1] ChangeNumberWords() method header (and end where appropriate) takes one parameter and adds parameter to attribute NumberWords
  12. [1] Description () method header (and end where appropriate) taking no parameters and overriding/overloads/extending/using parent method
  13. [1] Concatenating and returning the correct string
  14. [1] Class header (and end where appropriate) inherits from Animal
  15. [1] Constructor header (and end where appropriate) taking 5 parameters within class and calling parent constructor with parameters
  16. [1] Attribute Territory defined as int and parameter assigned within constructor
  17. [1] SetTerritory() method header (and end) takes 1 parameter and adds parameter to attribute TerritorySize
  18. [1] Description () method header (and end where appropriate) taking no parameters and overriding/overloads/extending/using parent method
  19. [1] Concatenating and return correct message
  20. [1] 1 correct instance created and stored in a suitable variable/structure
  21. [1] 2nd and 3rd correct instances created and stored in a suitable variable/structure
  22. [1] Calling SetTerritorySize(-20) for instance of Nighteyes
  23. [1] Calling ChangeNumberWords (2) for instance of Chewie
  24. [1] Calling Description() for all 3 animals (after any updates) and outputting return values
  25. [1] All three messages accurate with all relevant values
  26. [1] ... showing correctly updated territory for Nighteyes and words for Chewie

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, 26 marks.
Source
A-Level Computer Science, May/June 2025 Paper 4 Variant 2, question 3.

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