Inheritance and Polymorphism
The power of object-oriented programming lies in "manipulating different types of objects through a uniform interface," and the core mechanism that makes this possible is inheritance and polymorphism. In this chapter, we start with single inheritance, clarify what a virtual function table really is, explore how pure virtual functions and abstract classes design interfaces, and then examine the complexity of multiple inheritance and virtual inheritance. Finally, we tie these OOP design concepts together through a hands-on case study.