Exam 15: Polymorphism and Virtual Functions

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

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

Free
(True/False)
4.7/5
(74)
Correct Answer:
Verified

True

A virtual member function of class that should not be overridden in a derived class should be declared

Free
(Multiple Choice)
4.9/5
(82)
Correct Answer:
Verified

B

The term ________ means the ability to take many forms.

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

B

In C++ polymorphism is very difficult to achieve unless you also use inheritance.

(True/False)
4.9/5
(81)

To indicate that a member function of a class is pure virtual,

(Multiple Choice)
4.8/5
(69)

When the compiler binds a call to a member function using only information available at compile time, the compiler is said to use ________ binding.

(Multiple Choice)
4.8/5
(69)

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

(Multiple Choice)
4.8/5
(81)

A class with at least one pure virtual function is called

(Multiple Choice)
4.9/5
(80)

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

(Multiple Choice)
4.9/5
(65)

Declaring a member function of a class to be a ________ will cause the C++ compiler to use dynamic binding.

(Multiple Choice)
4.9/5
(87)

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

(Multiple Choice)
5.0/5
(76)

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

(Multiple Choice)
4.9/5
(86)

A pure virtual function

(Multiple Choice)
4.8/5
(82)

An abstract class is

(Multiple Choice)
4.8/5
(77)

Polymorphism in C++ will not work unless ________.

(Multiple Choice)
4.8/5
(82)

A pure virtual function

(Multiple Choice)
4.8/5
(86)

An abstract class is somewhat restricted in how it can be used because

(Multiple Choice)
4.8/5
(77)

Static binding occurs when the compiler binds a function call at compile time.

(True/False)
4.9/5
(81)

When a virtual member function of a class in a class hierarchy is invoked through a pointer to an object in the class hierarchy, the compiler will select the member function to be invoked

(Multiple Choice)
4.8/5
(70)

In C++, polymorphism is based on the ability to make member functions of a class

(Multiple Choice)
4.8/5
(78)
Showing 1 - 20 of 22
close modal

Filters

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