Re: Some questions about inheritance
- From: Bruno Desthuilliers <bdesth.quelquechose@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 23:30:41 +0200
Kallol Borah a écrit :
Tony My take on your query is this : a) Abstract classes do have method signatures that defines the semantics of the actual implementation of the method by a sub-class. They therefore specify a behavioral pattern, although, of course, that pattern can be over ridden by the sub-class method implementation. b) Different semantics - your second part of the question probably refers to method overriding - the sub-class methods may override the superclass semantics and implement those methods in a different way.
Delegation and Composition are two ways of extending behavior. Delegation is most commonly seen in class inheritance where a subclass extends a superclass or an abstract class Composition refers to a class aggregating behavior, lets say, defined by several interfaces or an interface composing/aggregating behavior defined by other interfaces.
Hope this helps.
It doesn't. Either you are joking - and it's not fun - or you don't know zilch about OO. In both cases, please stop posting such non-sense.
.
- References:
- Some questions about inheritance
- From: Tony Johansson
- Re: Some questions about inheritance
- From: Kallol Borah
- Some questions about inheritance
- Prev by Date: Re: XP and Pair Programming
- Next by Date: Re: Some questions about inheritance
- Previous by thread: Re: Some questions about inheritance
- Next by thread: Re: Some questions about inheritance
- Index(es):
Relevant Pages
|