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.9/5
(82)
Correct Answer:
Verified

B

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

Free
(True/False)
4.8/5
(81)
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
(72)
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.9/5
(77)

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

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

(Multiple Choice)
4.8/5
(85)

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

(Multiple Choice)
4.8/5
(77)

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

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

(True/False)
4.8/5
(82)

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

(Multiple Choice)
4.8/5
(91)

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

(Multiple Choice)
4.9/5
(78)

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

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

(Multiple Choice)
4.9/5
(77)

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

The ________ constructor is called before the ________ constructor.

(Multiple Choice)
4.9/5
(83)

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

(Multiple Choice)
4.9/5
(66)

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

(True/False)
4.9/5
(67)

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

(Multiple Choice)
4.8/5
(68)

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

(True/False)
4.8/5
(68)

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

(Multiple Choice)
4.9/5
(84)
Showing 1 - 20 of 40
close modal

Filters

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