Implementing Hierarchies with Single Inheritance
This chapter will extend our pursuit of object-oriented programming in C++. We will begin by introducing additional OO concepts, such as generalization and specialization, and then understand how these concepts are implemented in C++ through direct language support. We will begin building hierarchies of related classes, and understand how each class can become an easier to maintain, potentially reusable building block in our applications. We will understand how the new OO concepts presented in this chapter will support well-planned designs, and we will have a clear understanding of how to implement these designs with robust code in C++.
In this chapter, we will cover the following main topics:
- Object-oriented concepts of generalization and specialization, and Is-A relationships
- Single inheritance basics – defining derived classes, accessing inherited members, understanding inherited access labels and regions, and...