Exam 13: Object-Oriented Programming: Polymorphism

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

Run-time type information can be used to determine:

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

C

Which of the following assignments would be a compilation error?

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

B

The main difference between a pure virtual function and a virtual function is:

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

C

Polymorphism is implemented via:

(Multiple Choice)
4.8/5
(28)

If objects of all the classes derived from the same base class all need to draw themselves, the draw) function would most likely be declared:

(Multiple Choice)
4.8/5
(46)

Abstract classes:

(Multiple Choice)
4.8/5
(42)

Problems using switch logic to deal with many objects of different types do not include:

(Multiple Choice)
4.8/5
(41)

The line: Virtual double functionX) const = 0; In a class definition indicates that the class is probably a:

(Multiple Choice)
4.8/5
(41)

The C++ compiler makes objects take up more space in memory if they:

(Multiple Choice)
4.9/5
(34)

Which of the following would not be a member function that derived classes Fish, Frog and Bird should inherit from base class Animal and then provide their own definitions for, so that the function call can be performed polymorphically?

(Multiple Choice)
4.8/5
(34)

Which of the following statements about virtual functions is false?

(Multiple Choice)
4.9/5
(33)

Virtual functions must:

(Multiple Choice)
4.8/5
(52)

Abstract classes do not necessarily have:

(Multiple Choice)
4.9/5
(32)

An abstract class will:

(Multiple Choice)
4.9/5
(45)

Employee is a base class and HourlyWorker is a derived class, with a redefined non-virtual print function. Given the following statements, will the output of the two print function calls be identical? HourlyWorker h; Employee *ePtr = &h; EPtr->print); EPtr->Employee::print);

(Multiple Choice)
4.8/5
(37)

Concrete classes that inherit virtual functions but do not override their implementations:

(Multiple Choice)
4.9/5
(41)

Virtual destructors must be used when:

(Multiple Choice)
4.9/5
(28)

The line: Virtual double earnings) const = 0; Appears in a class definition. You cannot deduce that:

(Multiple Choice)
5.0/5
(38)

The __________ operator returns a reference to a __________ object:

(Multiple Choice)
4.9/5
(41)

Which of the following is not allowed?

(Multiple Choice)
4.7/5
(35)
Showing 1 - 20 of 23
close modal

Filters

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