Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does association in UML associate objects or classes?

On Wikipedia, I'm reading that an association relationship is an instance level relationship so we are talking about the relationship between the objects of two classes.

When we actually draw a class diagram, why do we use association on the class elements or blocks rather than objects? And there are also class level relationships for which we again use class elements. Since we don't have any way to show if we are talking about objects or classes I find this confusing. For example: I've heard people saying "Associate these two classes" Doesn't that sound wrong?

like image 667
cpx Avatar asked Jan 13 '23 20:01

cpx


1 Answers

Links are to Associations as Objects are to Classes.

A Class is an abstraction that describes many specific objects. Similarly, an Association is an abstraction that describes many links between objects.

So your statement

an association relationship is an instance level relationship

isn't strictly correct because it mixes the abstraction (Association Relationship) with the instances it represents.

hth.

like image 78
sfinnie Avatar answered Jan 23 '23 23:01

sfinnie