Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between dependency and association

 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the practical difference between these other then
depiction on the UML.
Say I have a class A which has a variable B . Is A an association to B.
Another way is I have a method in A which takes locally B .. Then is B a dependency for A.

Or is the dependency only what the definition says ..
If a change in B "may cause a change in A" then A dependent on B.. .
So in both the cases aboves are they assoications or depedencies ..

Can some one please clarify
Thanks
Dhiren
 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got the solution here
http://www.junlu.com/msg/44479.html
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, we spoke a little bit about it last week:

http://www.coderanch.com/t/152697/java-Architect-SCEA/certification/Association-vs-Dependency

Regards,
Dan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic