Say that there are three classes: computer, apple computer, and ibm computer. What are the likely relationships between these classes
Answers
Answered by
0
Answer:
both are computer but of different company
Explanation:
like pc laptops and mobile
are different in size and shape but are same
Answered by
1
Answer:
The correct option is Computer is the superclass, AppleComputer and IBMComputer are subclasses of Computer.
Explanation:
- Inheritance is a concept of Object-Oriented Programming in which all the features of the super class or parent class can be used by the subclass or child class. It provides the feature of code reusability.
- Since, we can see that the Computer is super class as IBMComputer and AppleComputer are the type of Computer class. Since they had derived the properties of the Computer class. Hence, the Computer class will be the Super class and IBMComputer and AppleComputer are the child class.
Similar questions