UML聚集多样性
该图的多重性值是什么意思? 它们是否意味着每个shostore都必须具有1个Nikeshoes实例,并且同一实例可以成为许多shoestore实例的一部分?换句话说,许多Shoestores可能会有相同的鞋子(实例,而不是类型)可以出售?谢谢。
What do the diagram's multiplicity values mean?
Do they mean each ShoeStore must have 1 instance of NikeShoes, and that the same instance can be part of many ShoeStore instances? In other words, many ShoeStores might have the same pair of shoes (an instance, not the type) to sell? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该图显示了共享的聚合关系。根据UML 2.5,这没有定义的语义。 P. 110:
因此,剩下的是一个协会(除了一些隐藏的文档解释了钻石的确切语义)。这意味着您可以在0..n
shoestore
中拥有1个nikeshoes
。这可能意味着什么。关于多重性:UML 2.5的第34页说
The diagram shows a shared aggregation relation. As per UML 2.5 this has no defined semantics. P. 110:
So what is left is an association (except there is some hidden document explaining the exact semantics of the diamond). And that means you can have 1
NikeShoes
in 0..nShoeStore
. What ever that might mean.Regarding multiplicities: pp. 34 of UML 2.5 says
1
多重性是1..1
的定义快捷方式,这意味着shoestore
的每个实例必须最小并且最多1个实例Nikeshoe
。反向
*
多重性是0 ..*
的定义快捷方式,这意味着nikeshoe
的实例可以是最低零件,并且最大shoeshop
的实例。The
1
multiplicity is a defined shortcut for1..1
, meaning that every instance ofShoeStore
must have at minimum and and maximum 1 instance ofNikeShoe
.The reverse
*
multiplicity is a defined shortcut for0..*
which means that an instance ofNikeShoe
can be part minimum 0 and maximum an infinity of instances ofShoeShop
.