This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class Diagram -- Associations

 
SGee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With the class diagrm, a straight line from one class to another represents Association...Open diamond represents Aggregation and a closed/filled diamond represents a Composition.
What are the differences between these? I would really appreciate a detailed explanation is anyone is in the mood to pass that knowledge around.
Thanks,
gee
 
Vijay Shrivastava
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please go through
http://www.togethersoft.com/files/services/umlonlinecourse/
and UML distilled book you will get good understanding of it.
 
SGee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That link is on the big list posted here. It's good but does absolutly nothing to explain, in detail, what each do.
 
Burk Hufnagel
Ranch Hand
Posts: 814
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's see now...
Aggregation is when an object has a reference to another, and the object being referenced can exist on it's own. Like a club has a member. If the club goes away, the member still exists.
Composition is similar except that the object being referenced only exists as part of the object that references it. Here's a weird example - a donut has a hole, but if you eat the donut (destroy the object) the hole goes away too.
Association explains the connection between two objects... Sorry, I haven't got a good explanation for that one. Maybe someone else can lend a hand.
Burk
 
krishna_balaji
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Association - Ex: Husband and Wife
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SGee
Please read the Javaranch Naming Policy and change your publicly displayed name to comply with our unique rule. Thank you for your cooperation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic