Exam 15: Inheritance, Polymorphism, and Virtual Functions

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

The compiler performs ________ on virtual functions.

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

B

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

Free
(True/False)
4.8/5
(33)
Correct Answer:
Verified

False

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.

Free
(True/False)
4.9/5
(28)
Correct Answer:
Verified

True

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

(Multiple Choice)
4.8/5
(31)

The following statement: The following statement:   Allows the ________ members of the Car class to access ________ members of the Vehicle class. Allows the ________ members of the Car class to access ________ members of the Vehicle class.

(Multiple Choice)
4.8/5
(41)

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

(Multiple Choice)
4.8/5
(42)

The base class's ________ affects the way its members are inherited by the derived class.

(Multiple Choice)
4.8/5
(38)

In the following statement: class car : In the following statement: class car :   ________ is the base class. ________ is the base class.

(Multiple Choice)
4.7/5
(38)

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

(True/False)
4.8/5
(40)

When more than one class is derived from a base class, the situation is called:

(Multiple Choice)
4.8/5
(41)

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

(Multiple Choice)
4.9/5
(37)

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
(38)

Multiple inheritance opens the opportunity for a derived class to have ________ members.

(Multiple Choice)
4.9/5
(39)

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.

(Multiple Choice)
5.0/5
(39)

The ________ constructor is called before the ________ constructor.

(Multiple Choice)
4.8/5
(39)

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

(Multiple Choice)
4.8/5
(31)

When arguments must be passed to the base class constructor, they are passed from the derived class constructor's header line.

(True/False)
4.8/5
(35)

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

(Multiple Choice)
4.8/5
(26)

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

(True/False)
4.8/5
(30)

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

(Multiple Choice)
4.8/5
(42)
Showing 1 - 20 of 40
close modal

Filters

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