Question 9
OCR Computer Science June 2024 Computer systems (H446-01)A level5 marks
On the specification
- 2.2 Problem solving and programming
Question text
9 OCR DogCare look after dogs while their owners are at work. They use a program developed in an object-oriented paradigm to store details about each dog. Each dog is declared by using an instance of the class Dog. This has these private attributes: • name • breed • height • weight The constructor method sets all the attributes to the values passed in as parameters. Write pseudocode or program code to define the class Dog. You should include the attributes and constructor method. You do not need to write the set or get methods. [5]