Exam 15: Inheritance, Polymorphism, and Virtual Functions

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Arguments are passed to the base class by the __________ class __________ function.

Free
(Multiple Choice)
4.8/5
(38)
Correct Answer:
Verified

E

Select all that apply. The base class access specification determines how __________ members in the base class may be accessed by derived classes.

Free
(Multiple Choice)
4.8/5
(30)
Correct Answer:
Verified

A, B, D

C++11 introduced the __________ key word to help prevent subtle errors when overriding virtual functions.

Free
(Multiple Choice)
4.8/5
(26)
Correct Answer:
Verified

C

Which is the base class in the following statement? Class Car : Public Vehicle

(Multiple Choice)
4.8/5
(31)

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

(Multiple Choice)
4.8/5
(32)

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/False)
4.9/5
(31)

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/False)
4.9/5
(35)

A member function of a derived class may not have the same name as a member function of a base class.

(True/False)
4.9/5
(35)

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

(True/False)
4.8/5
(30)

The following statement allows the __________ members of the Car class to access __________ members of the Vehicle class. class Car : Public Vehicle

(Multiple Choice)
4.8/5
(29)

A derived class may become a base class if another class is derived from it.

(True/False)
4.8/5
(33)

Select all that apply. Which of the following constructors cannot be inherited through constructor inheritance?

(Multiple Choice)
4.9/5
(38)

The compiler performs __________ on virtual functions.

(Multiple Choice)
5.0/5
(39)

Polymorphism is when __________ in a class hierarchy perform differently, depending on which object performs the call.

(Multiple Choice)
4.9/5
(38)

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

(Multiple Choice)
4.8/5
(38)

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

(Multiple Choice)
4.9/5
(37)

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

(True/False)
4.7/5
(39)

Which of the following is commonly used to extend a class or to give it additional capabilities?

(Multiple Choice)
4.9/5
(31)

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

(Multiple Choice)
4.7/5
(47)

Select all that apply. The base class's __________ affects the way its members are inherited by the derived class.

(Multiple Choice)
4.9/5
(30)
Showing 1 - 20 of 43
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)