The Artima Developer Community
Sponsored Link

Composition advantage

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:

Composition advantage

Posted by Alex Pushkin on 23 Nov 1998, 3:41 AM

Hi all,

Just a little though on composition:
One of its advantages would be to 'hide' methods of the super
class to the users. For instance, when implementing a dialog
with specific layout and very well specified behaviour,
you probably don't people being able to use the add() method.
Instead, very few super class methods should be made available.
Creating a new object could automatically pack and show the
dialog (implementing a start() method could be another option).

Alex.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us