This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

aggregation vs composition

 
Vzy Mar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Just I wanted to know more details about the Composition. As per my understand, Composite object is made of the components. Or Components doesn't have any value without Composite object.

I would like to know that, Is above example will come under the Composition?.

 
Vzy Mar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
corrected
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aggregation. Aggression means something else completely.

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read.

You can edit your post by using the button.
 
Vzy Mar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David,

Thank you for correcting me on post. I was in hurry while posting the question, never repeat the mistake again.
 
Vlad Varnica
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can download an UML modeling tool and reverse your java code.
You will immediately see if it is detected or not as an aggregation.

btw, you code is for me a 1 to 1 association.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic