In this chapter you’ll:
See how polymorphism makes programming more convenient and systems more extensible.
Understand the relationships among objects in an inheritance hierarchy.
Use C++11’s overrides
keyword when overriding a base-class virtual function in a derived class.
Use C++11’s default
keyword to autogenerate a virtual
destructor.
Use C++11’s final
keyword to indicate that a base-class virtual function cannot be overridden.
Create an inheritance hierarchy with both abstract and concrete classes.
Determine an object’s type at runtime using runtime type information (RTTI), dynamic_cast
, typeid and type_info.
Understand how C++ can implement virtual functions and dynamic binding.
Use virtual destructors to ensure that all appropriate destructors run on an object.