Computer Science 223 Discussion Questions

Riel, Chapter 6

Discussion Questions submitted for Chapter 6 of Riel

Multiple Inheritance: Concept and Examples

  1. A valid use of multiple inheritance enables an inherited class to view only from one of the higher classes via a given reference.(p.136) Then, how is it useful to have multiple inheritance? --Hisako
  2. Could I see more examples of multiple inheritance
  3. Is there any problem that suits a multiple inheritance solution? It seems that even if it emulates real life it is still best to avoid. Steve F.
  4. How is it handled if two or more classes which are being extended have methods with the same name? -Todd
  5. Can you clarify Heuristic 6.3?
  6. Isn't it possible to solve most any problem without using MI?
  7. Is there an alternative approach to diamond-shaped multiple inheritence that simplifies design and implementation? (Raz)
  8. In the case where two base classes have the same method, which is inherited by the derived class? Does it flip between the two base classes any time the method called? Anthony
  9. Can you more clearly explain subtyping for combination? Patrick Dowd
  10. Does a subtyping of combination relationship exist in our project? For instance, in drop-in appointment class? Taha
  11. I can't think of any, but are there any instances in our design where MI would be desirable (if Java allowed MI)? (Nick W)

Delegation Functions

  1. Can you go over delegation functions a bit more?
  2. Could you explain the discussion in 6.4 about Pseudo-Inheritance and the delegation of functions to containment classes. -George
  3. What is the function of a delegation function? ~yasir.

Multiple Inheritance and Java?

  1. Do we have the ability to use multiple inheritance in java? Steve F
  2. Is it correct to say that Java does not allow multiple inheritance? -Todd
  3. After reading chapter 6, I feel like Multiple Inheritance is more troublesome than helpful. Is subtyping for combination the only valid use of MI? - Elias Vafiadis
  4. Is multiple inheritance supported by java? (Sam Vanderhyden)
  5. What languages allow multiple inheritance, and which do not? -Jim Finnessy
  6. I did not understand how figure 6.5 contained unnecessary complexity? It seems like you would probably have to do a similar design in Java, since it does not allow you to extend more than one class. -Peter Likarish
  7. Is there a keyword in java like virtual in C++? - Elias Vafiadis


  1. Can you go over mixins a bit more?
  2. Don't mixins violate behavior heuristics of previous chapters? -Jim Finnessy
  3. Could you please give an illustration of mixins and their appropriate implementation? -Peter Likarish
  4. Could you explain the difference between mixins and compositional mixins? Dessislava Dimova
  5. What advantage, if there is, do mixins provide when implenting multiple inheritance? -George
  6. It would be nice if you could further explain the mixin and compositional mixin example in class. (Raz)
  7. Can you clarify the use of Multiple Inheritence in the design of Mixins?
  8. What is the advantage of using compositional mixins over regular mixins? (Sam Vanderhyden)
  9. When would one want to create a mixin? Patrick Dowd
  10. The book talks about mixins being very static. Can you please go back briefly touch on the concept of static? Anthony

Directed Acyclic Graphs (DAGs) and Multiple Inheritance

  1. In case of a DAG multiple inheritance, what is a good rule-of-thumb as to when to use multiple inheritance and when to use containment? For example, "Bad House" is an example of multipe inheritance but a good designer will use a containment relationship. Dessislava Dimova
  2. Is DAG multiple inheritance common? The book says it is not, but I think that it could happen often in real world problems. Is DAG worth having, although it seems that it adds complication to the design? --Hisako

Other Questions

  1. Could you please clarify the idea of Frameworks that Incorporate Multiple Inheritance? ~yasir.
  2. Why is multiple inheritance valid only when it is capturing a subtyping for combination relationship? Taha
  3. What does Riel mean on page 136 when he states that the "wooden door" object must be viewed as either a wooden door or a wooden object through a given reference? (Nick W)

This document is available on the World Wide Web as

created April 16, 2002
last revised April 16, 2002
Valid HTML 3.2!
For more information, please contact Henry M. Walker at