Answers to Self-Review Exercises
-
derived-class object.
switch
.abstract.
concrete.
dynamic_cast
.type_info
.Polymorphism.
virtual
.downcasting.
-
False. An abstract base class can include virtual functions with implementations.
False. Referring to a base-class object with a derived-class handle is dangerous.
False. Classes are never declared
virtual
. Rather, a class is made abstract by including at least one pure virtual function in the class.True.
True.
Get C++ How to Program, 10/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.