Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
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
A dependency exists between two elements if changes to the definition of one element may cause chagnes to the other. (quoted from UML distilled, 2nd ed.)
Originally posted by Pradeep Bhat:
Doesn't that mean that there will be method invocations on the depended object?
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
SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287
Originally posted by cyril vidal:
Here, every object of type 01 will include a reference to one object of type 02, and these two objects will be closely linked. That's an association (more precisely here, an aggregation).
Now, an exemple of dependency (parameter):
Another example of dependency (local object):
So, I would say that an association relationship is stronger than a simple dependency one,
But in the case of composition, the object 02 will born and die with object 01
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
I don't see how we would know wether the above is an aggregation.
In UML 1.x, a parameter could also be modeled as an association (using the parameter stereotype). As far as I know, this changed in UML 2.
SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287
Originally posted by cyril vidal:
Yes. But an association with "local" or "parameter" stereotype specified still remains different from an dependencie with a local or parameter object.
In the first case, a type of one object stands as an attribute type for the other one, which is no true in the second case.
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
I am not sure I follow you here. Would you like to elaborate, please? Thanks!
SCJP 1.4, SCWCD, SCBCD, IBM XML, IBM Websphere 285, IBM Websphere 287
Not necessarily. It could simply use a declared constant. Or hold a reference to an object without ever calling a method on it, for example.
Originally posted by Pradeep Bhat:
Can I say Aggregation is a subclass of 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
Originally posted by Pradeep Bhat:
If it just holds a reference without calling a method why is that called a dependency.
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
Originally posted by cyril vidal:
Perhaps I'm wrong, but up to now I thought that a association relationship meant a structural relationship, i.e. one object holds permanently the adress of the other one, so includes the type of this object as attrbute type.
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
Originally posted by Pradeep Bhat:
Is it true that association notation is not supported 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
Are we home yet? Wait, did we forget the tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|