Search code examples
associationsumldiagram

Two roles in one association (UML diagram)


I have never seen two roles in a association relationship in a UML diagram. Is the following appropriate notation, or is there another method of listing two roles?

enter image description here


Solution

  • Your diagrams says that Course has a property named 1 teaches of type Instructor. And Instructor has a property has a * of type Course.

    I guess that the 1 and * are multiplicities and they should be placed a bit apart from role names to distinguish them. The remaining role names should rather correspond to what the properties represent. So where currently you see 1 teaches it should be teacher and on the other side there should be classes (both with the multiplicities offset).