A program stores data about animals using Object-Oriented Programming (OOP). The class Animal stores the data about animals. 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. (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. (iii) Test your program. Take a screenshot of the output(s).

Computer Science
IGCSE&ALevel
CAIE
Exam No:9618_s25_qp_42 Year:2025 Question No:3(d)

Answer:







Knowledge points:

19.1 Algorithms
20.1 Programming Paradigms
20.2 File Processing and Exception Handling

Solution:

Download APP for more features
1. Tons of answers.
2. Smarter Al tools enhance your learning journey.
IOS
Download
Android
Download
Google Play
Download