wood burning stoves 2.0*
The moose likes Java in General and the fly likes How do we implement Composition and Aggregation relation in code ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How do we implement Composition and Aggregation relation in code ??" Watch "How do we implement Composition and Aggregation relation in code ??" New topic
Author

How do we implement Composition and Aggregation relation in code ??

Abhineet Kapil
Ranch Hand

Joined: Feb 08, 2010
Posts: 52

Hi,,

I know both , compo and aggre are types of associations between classes. I know that composition is a strong relation .. aggre is a weak one..
eg. There is College, Departments, and Professors..
College class has a strong relation with Departments as the departments dont have individual existence..
But it has weak relation with Professors... Even after college is destroyed Professors may exist..

Please explain using a coding example how do we implement Composition and ho w do we implement aggregation ?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37945
    
  22
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do we implement Composition and Aggregation relation in code ??
 
Similar Threads
How do u know which is composition and which is aggregation
Association Vs Aggregation Vs Composition
How to differentiate among aggregation, association and composition?
Question about class diagram
Composition in Rational Rose 2001