The Artima Developer Community
Sponsored Link

Legacy Design Forum
Composition Versus Inheritance

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:

doubt between aggregation ,composition and association

Posted by sobhan samantaray on February 17, 2001 at 11:00 AM

>
> I'm still not sure I understand aggregation. If I instantiate
> an object and hand out references to it then it's aggregation
> as opposed to composition, right? If so, what happens to the
> references/pointers if the instantiating class goes away in
> C++ and Java?

> I'm new to OO design, can somebody show me the difference,
> in code, between association, aggregation and composition for
> C++ and Java?

> Thanks

> Gene






Replies:
  • understand details ashok kumar behera November 06, 2001 at 6:32 AM (0)
  • help sueda October 23, 2001 at 6:37 AM (0)

Sponsored Links



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