aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Association and aggregation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Association and aggregation" Watch "Association and aggregation" New topic
Author

Association and aggregation

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

What is the difference between association and aggregation ?
Is Aggregation a stronger form of association?


Groovy
Awais Bajwa
Ranch Hand

Joined: Jan 16, 2001
Posts: 191
Association is sometimes known as bidirectional relationship in which both classes know each other. Aggrigation is a kind of association in which whole/part relationship lies.
Regards
Awais
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Association is sometimes known as bidirectional relationship in which both classes know each other.

Even in aggregation both the classes can know each other and can also be able to navigate.
Fintan Conway
Ranch Hand

Joined: Apr 03, 2002
Posts: 141
Originally posted by Pradeep Bhat:
What is the difference between association and aggregation ?
Is Aggregation a stronger form of association?

Aggregation is a more specialised form of association. Aggregation tells you that the relationship is a whole/part association.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Fintan Conway:

Aggregation is a more specialised form of association. Aggregation tells you that the relationship is a whole/part association.

Yes. Which actually means that there is no cycle in the object graph allowed - the whole must not be part of itself.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Association and aggregation