Search code examples
umlconstraintsclass-diagram

about constraints in class diagram


Take the following class diagram: enter image description here

I want to model the following constraint: A member must not participate in several thesis defences programmed on the same date.


Solution

  • I would use a qualifier to express that given a date, there will be zero or one Thesis Defence. That looks like an extra rectangle on the Member end of the association containing the string "defence date : DateTime" and a multiplicity of [0..1] on the other end. Please see Qualified Association | Applying UML and Patterns: UML Class Diagrams | InformIT for an example.