my dog learned polymorphism*
The moose likes OO, Patterns, UML and Refactoring and the fly likes multiple classification and multiple inheritance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "multiple classification and multiple inheritance" Watch "multiple classification and multiple inheritance" New topic
Author

multiple classification and multiple inheritance

Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
Fowler says,
"Note that multiple classification is different from multiple inheritance. Multiple inheritance says that a type may have many supertypes, but that a single type must be defined for each object. Multiple classification allows multiple types for an object without defining a specific type for the purpose"
I'm not clear about what he says? Can someone please clarify,
Thanks.
Jayadev Pulaparty
Ranch Hand

Joined: Mar 25, 2002
Posts: 662
I read Martin Fowler's pdf document on the roles and subtyping and could make some sense(i guess) of what he is talking above.
Multiple classification is a concept that can be achieved by implementation of multiple interfaces (roles). Hence we have an object(type) that is implementing multiple types without defining the object type for the specific purpose of multiple classification. This is not the case in multiple inheritance. I guess dynamic classification gives further flexibility to multiple classification with the ability of switching between the roles of a particular object. Did i or still , not really sure
Any thoughts will be appreciated.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I guess you got it!


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiple classification and multiple inheritance