最佳答案
是的,这是有道理的,但不是必需的。重数 0..*
告诉读者,引用 Class2 特定实例的 Class1 实例的数量没有限制。如果是 2..3
,则表示只有 2 或 3 个 Class1 实例将与 Class2 的任何实例关联。
可导航性与运行时效率有关,而多重性与参与关联的实例数量有关。这是协会的两个独立属性。
根据 UML 2.5.1 规范,第 11.5.3.1 节:
If an end is not navigable, access from the other ends may or may not be possible, and if it is, it might not be efficient.
关于uml - 在类关联的不可导航端指定多重性是否有意义? [统一建模语言],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74095587/