Class Diagrams: Associations for beginners

27 views
Skip to first unread message

Tim Ta

unread,
Jun 22, 2020, 5:54:48 AM6/22/20
to UML Forum
Hey Guys,

last time I read something about UML class diagrams was a long time ago.
Now I want to model a application and want to do it right. 

While doing this the following questions came to my mind:

1. If I have a main class. Isn't it the right modeling way to choose only terminated associations?:
see above

2. Does the composition associations imply that the Class with the black site is known by the other class?
I just want to build a class which is a part of a other class. But there should only be a know-connection in one way.

T
Untitled Diagram.png

Alex Jongman

unread,
Jun 22, 2020, 4:33:44 PM6/22/20
to UML Forum
Hi,

As far as I know a terminated association is an aspect of a lifecycle of an instance of an object and therefore part of behavior diagrams like Sequence- or State-diagrams. A class diagram represents the static structure of the code, and therefore doesn't terminate associations.

Your second question isn't completely clear to me, but as far as I understand it´s you want to expres that Class A knows about Class B but not the other way around. To express this in an UML model you can draw an association between Class A and B with the arrow pointing toward Class B. 

Alex 
Reply all
Reply to author
Forward
0 new messages