UML association ends: does every association connect two or more roles (association ends) on participating classifiers?

Difficulty: Easy

Correct Answer: Correct

Explanation:


Introduction / Context:
UML associations relate classifiers (such as classes) and are drawn as lines between them. Each end of an association is called a role (or association end) and can have multiplicity, navigability, and role names. The question asks whether each association has two or more roles.



Given Data / Assumptions:

  • Binary associations connect two classifiers and therefore have two roles.
  • N-ary associations connect more than two classifiers, yielding more than two roles.
  • Self-associations still have two roles (both endpoints on the same classifier).


Concept / Approach:
By definition, an association has at least two ends; otherwise there is no relationship. In UML, each end is an AssociationEnd with its own multiplicity and properties. Thus every association has two or more roles. There is no meaningful one-ended association in standard UML.



Step-by-Step Solution:

Consider a binary association between Class A and Class B: roles are A-end and B-end.Consider an n-ary association among A, B, C: roles are at each connected classifier.Even a self-link on A still has two association ends (A↔A), therefore two roles.Hence, “two or more roles” is correct.


Verification / Alternative check:
Inspect UML metamodel: Association::memberEnd is a collection with size ≥ 2.



Why Other Options Are Wrong:

  • Incorrect: Contradicts UML definitions.
  • “Only true for binary associations”: N-ary associations have more than two roles, not fewer.
  • “Only true in EER”: UML’s association concept is independent of EER notation.
  • “Exactly one role”: Not possible in standard UML.


Common Pitfalls:
Confusing roles with attributes; overlooking that role names are optional even though roles (ends) always exist.



Final Answer:
Correct

More Questions from Object-Oriented Data Modeling

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion