dcsimg
Dependency, Association
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anil_Chugh
Posted On:   Wednesday, November 14, 2001 07:44 AM

What's the difference between dependency and association?

Re: Dependency, Association

Posted By:   Bozidar_Dangubic  
Posted On:   Wednesday, November 14, 2001 07:55 AM

dependency represents a relationship where change in one class may trigger a need for a change in another class. this type of relationship is usually present when one class contains another class as a parameter in the operation. for instance, if you have a class Player that has a method play(Clip c), class Player has a dependency relationship with class Clip.


association is a relationship between two class where you can get from one class to another. there are many types of associations but it the broadest sense, when two classes are related via association, you get to one class from another and vice versa

Re: Dependency, Association

Posted By:   Bozidar_Dangubic  
Posted On:   Wednesday, November 14, 2001 07:52 AM

dependency represent an relationship where a change in on class can potentially affect another class. this type of relatioship is usually associated with one class containing another as parameter to an operation. for instance, if class Player has a method play(Clip c), then a change in class Clip can affect class Player. this is represented in UML as dependency. in this particular case, dependency is explicit and may not need to be represented as actual dependency on the model (with dashed line).


association is relationship where one class is associated with another class which means you can get from one class to another. there are many types of associations but in the broadest sense, when two classes are related via associations, you can get from one class to another in the application.
About | Sitemap | Contact