File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 40052
    
  28
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do we implement Composition and Aggregation relation in code ??