Mastering Abstract Classes
This chapter will continue expanding our knowledge of object-oriented programming in C++. We will begin by exploring a powerful OO concept, abstract classes, and then progress to understanding how this idea is implemented in C++ through direct language support.
We will implement abstract classes using pure virtual functions to ultimately support refinements in a hierarchy of related classes. We will understand how abstract classes augment and pair with our understanding of polymorphism. We will also recognize how the OO concept of abstract classes presented in this chapter will support powerful and adaptable designs, allowing us to create easily extensible C++ code.
In this chapter, we will cover the following main topics:
- Understanding the OO concept of an abstract class
- Implementing abstract classes with pure virtual functions
- Creating interfaces using abstract classes and pure virtual functions
- Generalizing derived class objects...