Introduction to OOP Chapter 13: Multiple Inheritance: next previous audio real text

Possible Solutions

Make Number subclass of Magnitude, but redefine comparison operators in class complex to give error message if used. (subclassing for limitation)

Don't use inheritance at all - redefine all operators in all classes. (flattening the inheritance tree).

Use part inheritance, but simulate others - use Number, but have each number implement all relational operators.

Make Number and Magnitude independent, and have Integer inherit from both. (multiple inheritance).
Intro OOP, Chapter 13, Slide 05