Past-paper question · 2025 May-June · Paper 42 · Q3(d)(ii)

Question 3(d)(ii) 2025 · May-June · Paper 42 · 3 marks

Original past-paper question for 3(D)(II)
Original past-paper question for 3(D)(II)
Original past-paper question for 3(D)(II)
Original past-paper question for 3(D)(II)
Original past-paper question for 3(D)(II)
Reveal official mark-scheme answer Official mark-scheme answer for 3(D)(II)

Official answer for Question 3

Part (d)

(ii)

Question 1

mark each

Question 3

  • Calling SetTerritorySize(-20) for instance of Nighteyes
  • Calling ChangeNumberWords(2) for instance of Chewie
  • Calling Description() for all 3 animals (after any updates) and outputting return values
✓
Example program code:
✓
Java
✓
Animal2.SetTerritorySize(-20);
✓
Animal1.ChangeNumberWords(2);
✓
System.out.println(Animal1.Description());
✓
System.out.println(Animal2.Description());
✓
System.out.println(Animal3.Description());
✓
VB.NET
✓
Animal2.SetTerritorySize(-20)
✓
Animal1.ChangeNumberWords(2)
✓
Console.WriteLine(Animal1.Description())
✓
Console.WriteLine(Animal2.Description())
✓
Console.WriteLine(Animal3.Description())
✓
Python
✓
Animal2.SetTerritorySize(-20)
✓
Animal1.ChangeNumberWords(2)
✓
print(Animal1.Description())
✓
print(Animal2.Description())
✓
print(Animal3.Description())
✓
9618/42
✓
Cambridge International AS & A Level – Mark Scheme
✓
May/June 2025
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 9618_s25_ms_42.pdf →

Show text version of question

Question 3

Part (d)

(ii)

Question 3

A program stores data about animals using Object‑Oriented Programming (OOP).

The class Animal stores the data about animals.

Animal Name : String stores the name of the animal

Sound : String stores the sound the animal makes

Size : Integer stores the size of the animal as an integer between 1 (smallest) and 10 (largest)

Intelligence : Integer stores the intelligence of the animal as an integer between 1 (least) and 10 (most) Constructor() initialises all attributes to its parameter values

Description() returns a string message that contains the data from the attributes

(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]
Topic relevance

Why this question appears here

49% assigned-topic match · Further programming › Programming paradigms

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9618_s25_qp_42.pdf

Keep practising this topic