11.1 Fill in the blanks in each of the following statements:
is a form of software reusability in which new classes acquire the members of existing classes and enhance those classes with new capabilities.
A base class’s members can be accessed only in the base-class declaration and in derived-class declarations.
In a(n) relationship, an object of a derived class also can be treated as an object of its base class.
In a(n) relationship, a class object has references to objects of other classes as members.
In single inheritance, a base class exists in a(n) relationship with its derived classes.
A base class’s members are accessible anywhere that the app has a reference to an object of that base class or to an object of any of its derived classes.
When an object of a derived class is instantiated, a base class is called implicitly or explicitly.
Derived-class constructors can call base class constructors via the keyword.
11.2 State whether each of the following is true or false. If a statement is false, explain why.
Base-class constructors are not inherited by derived classes.
A has-a relationship is implemented via inheritance.
A Car
class has is-a relationships with the SteeringWheel
and Brakes
classes.
Inheritance encourages the reuse of proven high-quality software.
When a derived class redefines a base-class method by using the same signature and return type, the derived class is said to overload that base-class method.