UML 图的多重性和聚合
UML diagram multiplicity and aggregation
我在这里理解多样性和聚合吗?
我想传达的想法是:
- 每个角色都有一本法术书。
- 每本法术书都有一组 4 个法术。 (这是我觉得有点奇怪的地方)
基本上可以了。 SpellArr
是(错误放置和大写的)冗余属性。相反,您应该将 dot-notation 与角色名称 spell
一起使用(应该改为 spells
)。还应删除空心菱形,因为它没有有用的语义。见第110 个规格:
Indicates that the Property has shared aggregation semantics. Precise semantics of shared aggregation varies by application area and modeler.
我在这里理解多样性和聚合吗?
我想传达的想法是:
- 每个角色都有一本法术书。
- 每本法术书都有一组 4 个法术。 (这是我觉得有点奇怪的地方)
基本上可以了。 SpellArr
是(错误放置和大写的)冗余属性。相反,您应该将 dot-notation 与角色名称 spell
一起使用(应该改为 spells
)。还应删除空心菱形,因为它没有有用的语义。见第110 个规格:
Indicates that the Property has shared aggregation semantics. Precise semantics of shared aggregation varies by application area and modeler.