|
Posted by Jerry Stuckle on 07/12/06 17:11
ybakos wrote:
> I don't quite get what you're trying to accomplish (but I'm not that
> bright).
>
> You should avoid deep inheritance heirarchies.
>
> Or perhaps you shouldn't override the methods in this manner, since you
> are trying to achieve the ability to 'reach back' up the inheritance
> chain to call the 'Grandparent' method.
>
> Not sure if this helps.
>
> Cheers,
> Yong
>
>
>
> Jeff North wrote:
>
Actually, Yong, I find "deep inheritance hierarchies" to be useful at
times. Of course they've been complicated - but each class only needs
to worry about its own implementation and the interface of its base
class. It all depends on what you need.
As for overriding the functions - that's one of the beauties of OO
programming. You call setSize() in the lowest class, and it processes
the request and passes it on to the parent. Of course, each setSize()
should have the same purpose - just each one performs whatever work is
needed on its own class.
P.S. Please don't top post. This group uses bottom posting as a
standard. Thanks.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|