Search code examples
umlclass-diagram

Is it possible to make more than one connection between two classes in class diagram?


Exemplary situation. listing1 and listing2 has two different purposes and can't be combined into one list. Is it legal in UML to create two separate lines between A and B like this.

class A {
    List<B> listing1;
    List<B> listing2;
    /* omitted */
}

class B {/* omitted */}

Solution

  • Yes, it is a valid case. Each relationship may have different multiplicity.