9

Exploring Multiple Inheritance

This chapter will continue broadening our knowledge of object-oriented programming in C++. We will begin by examining a controversial OO concept, multiple inheritance (MI), understanding why it is controversial, how it can reasonably be used to support OO designs, as well as when alternative designs may be more appropriate.

Multiple inheritance can be implemented in C++ with direct language support. In doing so, we will be faced with several OO design issues. We will be asked to critically evaluate an inheritance hierarchy, asking ourselves whether we are using the best design possible to represent a potential set of object relationships. Multiple inheritance can be a powerful OOP tool; using it wisely is paramount. ...

Get Deciphering Object-Oriented Programming with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.