I am currently struggeling with contraints in UML. Considering the following example:
The class A have an association to the class B and an association to the class C. Both associations are bidirectional. The Class A can have exactly one instance of B or one instance of C, but not B and C at the same time. In the other direction, B can have only one instance of A, and C can have 0..* instances of A.
I tried to solve this problem with an {XOR} constraint, which is described here https://www.uml-diagrams.org/constraint.html. Unfortunately, there are few examples that can be used as a guidance.
Here an example of my solution:
Does the solution correctly represents the described example?