Riel, Chapter 6
Discussion Questions submitted for Chapter 6 of Riel
Multiple Inheritance: Concept and Examples
-
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
-
Could I see more examples of multiple inheritance
-
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.
-
How is it handled if two or more classes which are being extended have
methods with the same name? -Todd
-
Can you clarify Heuristic 6.3?
-
Isn't it possible to solve most any problem without using MI?
-
Is there an alternative approach to diamond-shaped multiple inheritence
that simplifies design and implementation? (Raz)
-
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
-
Can you more clearly explain subtyping for combination? Patrick Dowd
-
Does a subtyping of combination relationship exist in our project? For
instance, in drop-in appointment class? Taha
-
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
-
Can you go over delegation functions a bit more?
-
Could you explain the discussion in 6.4 about Pseudo-Inheritance and the
delegation of functions to containment classes. -George
-
What is the function of a delegation function? ~yasir.
Multiple Inheritance and Java?
-
Do we have the ability to use multiple inheritance in java? Steve F
-
Is it correct to say that Java does not allow multiple inheritance? -Todd
-
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
-
Is multiple inheritance supported by java? (Sam Vanderhyden)
-
What languages allow multiple inheritance, and which do not? -Jim Finnessy
-
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
-
Is there a keyword in java like virtual in C++? - Elias Vafiadis
Mixins
-
Can you go over mixins a bit more?
-
Don't mixins violate behavior heuristics of previous chapters? -Jim
Finnessy
-
Could you please give an illustration of mixins and their appropriate
implementation? -Peter Likarish
-
Could you explain the difference between mixins and compositional mixins?
Dessislava Dimova
-
What advantage, if there is, do mixins provide when implenting multiple
inheritance? -George
-
It would be nice if you could further explain the mixin and compositional
mixin example in class. (Raz)
-
Can you clarify the use of Multiple Inheritence in the design of Mixins?
-
What is the advantage of using compositional mixins over regular mixins?
(Sam Vanderhyden)
-
When would one want to create a mixin? Patrick Dowd
-
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
-
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
-
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
-
Could you please clarify the idea of Frameworks that Incorporate Multiple
Inheritance? ~yasir.
-
Why is multiple inheritance valid only when it is capturing a subtyping for
combination relationship? Taha
-
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
http://www.cs.grinnell.edu/~walker/courses/223.sp02/read-riel-6.html