Anchor and class diagram

0 votes
asked Jan 31, 2021 in Question / help by anonymous

Hi !

I have a tille question. I would like to use "Anchor" from sequence diagram with a class diagram. I have a double relation with my class and one of this relation is a subset of the other.

A person is a member of a group and the leader of the group must be a group member. So the leader is a subset of member.

I have read I should link the 2 relations (like the anchor with sequence diagram), but I got a syntax error when I try...

Do you have an idea how to achieve that ?

Thank you very much for your help :)

1 Answer

0 votes
answered Feb 1, 2021 by The-Lu (64,760 points)

Hello A.,

Here is a proposal, without using 'anchor', but with 'diamond':

See documentation here:

Here is the proposal:

@startuml
skinparam style strictuml

<> Diamond
Person - Diamond

Group "1" -left- "1..*" Diamond: is a member <
Group "1" -left- "1"    Diamond: \nis a leader <

hide empty members
@enduml


[See on PlantUML online server]

If that can help,
Regards,
Th.

...