F Chapter 15
True/False: In an inheritance situation, you may not pass arguments to a base class constructor.
False
The ________ constructor is called before the ________ constructor
derived, base
The ________ destructor is called before the ________ destructor.
derived, base
Multiple inheritance is when a ________ class has ________ base classes.
derived, two or more
The compiler performs ________ on virtual functions
dynamic binding
In the following statement: class Car : protected Vehicle ________ is the derived class
Car
In the following statement: class Car : protected Vehicle ________ is the derived class.
Car
True/False: A derived class may not have any classes derived from it
False
________ allows us to create new classes based on existing classes
Inheritance
________ allows us to create new classes based on existing classes.
Inheritance
________ is commonly used to extend a class, or to give it additional capabilities.
Inheritance
Arguments are passed to the base class destructor function by the ________ class ________ function
None of these
The following statement: class Car : private Vehicle allows the ________ members of the Car class to access ________ members of the Vehicle class.
None of these
When more than one class is derived from a base class, the situation is called:
None of these
________ to a base class may be assigned the address of a derived class object.
Pointers
________ members of a base class are never accessible to a derived class.
Private
True/False: A derived class may become a base class, if another class is derived from it.
True
True/False: In C++ 11, if a derived class attempts to override a final member function, the compiler generates an error
True
True/False: More than one class may be derived from a base class.
True
True/False: Pointers to a base class may be assigned the address of a derived class object.
True
True/False: Static binding occurs when the compiler binds a function call with the function call that resides in the same class as the call itself.
True
True/False: When arguments must be passed to the base class constructor, they are passed from the derived class constructor's header line.
True
_______ functions are dynamically bound by the compiler.
Virtual
The base class's ________ affects the way its members are inherited by the derived class.
access specification
Multiple inheritance opens the opportunity for a derived class to have ________ members.
ambiguous
In the following statement: class car : protected vehicle What is being protected?
base class members
The ________ constructor is called before the ________ constructor.
base, derived
When you derive a class from an existing class, you ________ add new data and functions.
may
Polymorphism is when ________ in a class hierarchy perform differently, depending upon which object performs the call.
member functions
When a derived class has two or more base classes, the situation is known as ________.
multiple inheritance
A virtual function is a member function that expects to be ________ in a derived class.
overridden
C++ 11 introduces the ________ key word to help prevent subtle errors when overriding virtual functions
override
The term ________ means the ability to take many forms.
polymorphism
When member functions behave differently, depending upon which object performed the call, this is an example of ________.
polymorphism
Protected members of a base class are like ________, but they may be accessed by derived classes
private members
When the compiler binds a member function call with the version of the function that resides in the same class as the call itself, this is considered ________ binding
static
When the compiler binds a member function call with the version of the function that resides in the same class as the call itself, this is considered ________ binding.
static
In the following statement: class car : public vehicle ________ is the base class.
vehicle
A virtual function is declared by placing the key word ________ in front of the return type in the base class's function declaration.
virtual