Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
> First, the shown method of substituting composition for inheritance is the standard way VB does inheritance (except,of course an 'implements' clause which forces the subclass to have all methods provided by the parent. > > I was trying to answer the questions posed by the author > Extending the same argument for the employee -manager- person situation, there seems to be a standard classification problem here ( ref: UML distilled,by Fowler & Scott or UML, by Lee and Tepfenhart). > By definition, a class represents the behaviour an object will exhibit during its lifetime. And if a behaviour set is not for the entire lifetime, then we cannot make a subclass of that. > I will illustrate this with an example. > Now, if we start allowing the user to modify these shapes ? > In such a situation as this, we now have the 'circle'ness of the object an impermanent 'mode'. Then, we have to take up different > Any feedback on this is welcome All I can offer in feedback is that I agree with all of this bv Replies: |
Sponsored Links
|