C++ Ch 15 Inheritance, Polymorphism, and Virtual Functions

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Which is the derived class in the following statement?class Car : protected Vehicle

Car

In C++11, using constructor inheritance, it is possible for any of the base class's constructors to be inherited.

FALSE

A derived class may not have any classes derived from it.

False

In an inheritance situation, you may not pass arguments to a base class constructor.

False

C++11 provides a way for a derived class to inherit some of the base class's constructors.

TRUE

More than one class may be derived from a base class.

True

Pointers to a base class may be assigned the address of a derived class object.

True

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

The base class access specification can be viewed as a filter that base class members must pass through when becoming inherited members of a derived class.

True

What is being protected in the following statement?class Car : protected Vehicle

base class members

Select all that apply. In an inheritance situation, the new class that you create from an existing class is known as the

derived class, child class

Multiple inheritance is when a ________ class has ________ base classes.

derived, two or more

The compiler performs ________ on virtual functions.

dynamic binding

Arguments are passed to the base class destructor by the ________ class ________ function.

none of these ( derived, constructor; derived, destructor;base,constructor; base,destructor)

A virtual function is a function that expects to be ________ in a derived class.

overridden

The term ________ means the ability to take many forms.

polymorphism

When member functions behave differently depending on which object performed the call, this is an example of

polymorphism

The ________ members of a base class are never accessible to a derived class.

private

A virtual function is declared by placing the ________ key word in front of the return type in the base class's function declaration.

virtual

A ________ of a base class expects to be overridden in a derived class.

virtual function


Kaugnay na mga set ng pag-aaral

Ultrasound Physics: Period and Frequency (Chapter 3 Part 1)

View Set

Chapter 9 Compensating Employees STUDY!!!!

View Set

Chapter 4: Health of the Individual, Family, and Community

View Set

ACCT 2301-01 - Chapter 11 Homework

View Set

Exam 1: Nursing Assessment: Respiratory System, Upper respiratory

View Set