Summary
In this chapter, we have continued our progression with object-oriented programming, foremost, by understanding how pure virtual functions in C++ provide direct language support for the OO concept of an abstract class. We have explored how abstract classes without data members that do not contain non-virtual functions can support the OO ideal of an interface class. We’ve talked about how other OOP languages utilize interface classes, and how C++ may choose to support this paradigm as well by using such restricted abstract classes. We’ve upcast related derived class types to be stored as pointers of the abstract base class type, as a typical, and overall very useful, programming technique.
We have seen how abstract classes complement polymorphism not only by providing a class to specify common attributes and behaviors that derived classes share, but most notably to provide the interfaces of polymorphic behaviors for the related classes since abstract classes...