Quiz 10
Suppose a program uses two classes: Airplane and JumboJet. Which of these would most likely be the subclass?
JumboJet
A subclass can have a method with the same name as a method in the superclass.
True
Polymorphism allows you to write methods in a subclass that have the same name as methods in the superclass.
True
You can have an empty class.
True
In an inheritance relationship, the __________ is the specialized class.
subclass
In an inheritance relationship, the __________ is the general class.
superclass
It is not possible to call a superclass's __init__ method from a subclass's __init__ method.
False
Only the __init__ method can be overridden.
False
You create a subclass from a superclass. You can only access private data attributes derived from the parent class using...
accessor methods
This characteristic of object-oriented programming allows the correct version of an overridden method to be called when an instance of a subclass is used to call it.
polymorphism