What's the difference between Association and Dependency? Aren't they both the same thing? as if class A is associated with B then Class A is dependent on B ie. there's a dependency between A and B.
+1
A:
Similar topic in SO: Does an association imply a dependency in UML?
In the above post, there's a reference to the UML's Superstructure document:
OMG Unified Modeling LanguageTM (OMG UML) Superstructure (PDF format)
Very technical but can be a good read as well.
o.k.w
2009-11-03 11:05:52
I didn't know that before. Thanks +1
Adeel Ansari
2009-11-03 11:08:33
A:
Dependency relationship does not require direct communication between two elements. It just means that one object relies on a fact that another object exists.
Aleksei Potov
2009-11-03 11:06:36
+1
A:
When you are speaking in UML terms, an association allows one object to send a message to another object by instantiating it.A dependency, on the other hand, means that one objects relies on another object and it might change if the other object changes, however there are no instances of those to objects.
david
2009-11-03 11:11:01