Is association a type of Link?

120 Views Asked by At

What is the difference between Association , Aggregation and Link ? Is Association a type of Link ?

1

There are 1 best solutions below

0
On

Association is basic relationships in UML. It shows an organizational behavior or process between classes and should be available in USE CASES of existing system. For example a teacher teaches some courses to some students. In this situation, teaching can be an association between Teacher and Student and Course. For another example: a member can borrow some books from library. BORROW defined in organizational behaviors and can be an Association between Member and Book. (more details: https://www.uml-diagrams.org/association.html)

But, Aggregation is just a structural relationship between classes, not organizational behavior or process. You can assume that is physical relationship that shows is a part of. For example an apartment has some floors and a floor has some rooms. So there are two Aggregation between Apartment and Floor and another Aggregation between Floor and Room. (more details: https://www.uml-diagrams.org/aggregation.html)

Finally, Association and Aggregation have same effects on source code. For this reason, in reversing UML models from source code by CASE Tools, Aggregation can not distinguish from Association and all of them reverse to Association.

Notice that, Link relationship is an instance of an association and only can be used as association between objects, not classes. You can assume that is method call between objects. (more details: https://www.uml-diagrams.org/association.html)