What is a good example of association
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
composition
/ \
/ \
/ \
/ \
/ \
aggregation association
</pre>
is it something as simple as
class A{}
class B{
public A a = new A();
}
or is it something deeper than that ?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
)-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Originally posted by Mohanlal Karamchand:
as in <pre>
composition
/ \
/ \
/ \
/ \
/ \
aggregation association
</pre>
is it something as simple as
class A{}
class B{
public A a = new A();
}
or is it something deeper than that ?
association
/ \
/ \
/ \
/ \
/ \
aggregation composition
this seems more logical
also check out dependency( Class A calling a method of class B). Please check out the UML version 5. i like it except the word "semantic"
[everthing is hiddedn under it]Aadhi
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Does that make sense?
Regards,
Ellen
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Originally posted by Mohanlal Karamchand:
as in <pre>
composition
/ \
/ \
/ \
/ \
/ \
aggregation association
</pre>
Sorry, I don't think I do understand this diagram...
is it something as simple as
class A{}
class B{
public A a = new A();
}
or is it something deeper than that ?
This may well be a valid implementation of an association relationship between B and A (it may also be an aggregation or even composition - it can't be decided from this code snippet).
The semantic of an association from B to A is that instances of B may send messages to (call methods of) instances of class A.
Notice that for this, B doesn't need to have a field of type A. This may change in UML 2.0.
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
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Mr. Karamchand,
I noticed that this thread was moved here from MD.
What is the objective of this question ?
And why are you using a fake name in the OOP forum ?

-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Originally posted by Sahir Shibley:
I think he means that aggregation and association are two kinds of Composition.
Then he is wrong - composition is a special kind of aggregation, which is a special kind of an association.
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
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
http://people.cs.vt.edu/~kafura/cs2704/aggregation.concept.html
Kafura goes on to say "An association among objects is created when an object contains references or pointers to other objects."
That statement seems to imply that association is a relationship between the class and it's public data member ???
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Originally posted by Sahir Shibley:
He seems to have been influenced by Kafura.
http://people.cs.vt.edu/~kafura/cs2704/aggregation.concept.html
Uh oh - what a mess...
http://ootips.org/uml-hasa.html has it right, IMO.
Kafura goes on to say "An association among objects is created when an object contains references or pointers to other objects."
That's bogus - there are no associations between objects, only links (which are instances of associations). I think the reference above explains very well what an association is.
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
| Acetylsalicylic acid is aspirin. This could be handy too: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |










