Examining reasonable uses for multiple inheritance
Multiple inheritance is a controversial concept that arises when creating OO designs. Many OO designs avoid MI; other designs embrace it with strict usage. Some OOP languages, such as Java, do not explicitly provide direct language support for multiple inheritance. Instead, they offer interfaces, such as we’ve modeled in C++ by creating interface classes using abstract classes (restricted to containing only pure virtual functions) in Chapter 8, Mastering Abstract Classes.
Of course, in C++, inheriting from two interface classes is still a use of multiple inheritance. Though C++ does not include interface classes within the language, this concept can be simulated by employing a more restrictive use of MI. For example, we can programmatically streamline abstract classes to include only pure virtual functions (no data members, and no member functions with definitions) to mimic the OO design idea of an interface class.
Typical...