Articles
Bala Paranj

Difference between Association and Relationship

Articles by Bala Paranj

Relationship is a term used to indicate how classifiers "relate" to each other.

UML has four types of relationships. They are:

1. Dependency
2. Association
3. Generalization
4. Realization

Dependency

Dependency relationship is used to show uses relationship. It means the dependent classifier uses the independent classifier. In code this will appear as one class using another class as an argument in the signature of a method.

Association

An association is a structural relationship that shows connection between objects. Structural means a thing that is static in nature and it represents conceptual or physical element. It is found as nouns in the system. Presence of an association between two classes will allow us to navigate from an object of one class to an object of the other class and vice-versa.

Generalization

Generalizations is a specialization / generalization relationship where the objects of the specialized element can be substituted for objects of the generalized element. Therefore, the specialized element shares the structure and the behavior of the generalized element.

Realization

Realization is a relationship between classifiers. One of the classifier specifies a contract and other classifier implements the contract.

I have discussed these concepts in more detail with examples in the Study Guide, 4 chapters are completed and is now available for download as a free bonus when you buy the test package. The test package consists of 5 full length tests and exhaustive explanations for all answers.

OOAD skills for the real world projects

Study Guide - Object Oriented Analysis and Design with UML

 

   
© 2004 www.zepho.com All Rights Reserved.