UML聚集多样性

发布于 2025-01-26 11:03:31 字数 218 浏览 3 评论 0原文

“

该图的多重性值是什么意思? 它们是否意味着每个shostore都必须具有1个Nikeshoes实例,并且同一实例可以成为许多shoestore实例的一部分?换句话说,许多Shoestores可能会有相同的鞋子(实例,而不是类型)可以出售?谢谢。

UML Diagram

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

纵性 2025-02-02 11:03:32

该图显示了共享的聚合关系。根据UML 2.5,这没有定义的语义。 P. 110:

共享|表明该属性已共享聚合语义。共享聚合的精确语义因应用区域和建模者而异。

因此,剩下的是一个协会(除了一些隐藏的文档解释了钻石的确切语义)。这意味着您可以在0..n shoestore中拥有1个nikeshoes。这可能意味着什么。

关于多重性:UML 2.5的第34页说

零作为下限和未指定上限的多重性可以使用包含单个星的替代符号“ *”,而不是“ 0 ..*”多重性。

The diagram shows a shared aggregation relation. As per UML 2.5 this has no defined semantics. P. 110:

shared | Indicates that the Property has shared aggregation semantics. Precise semantics of shared aggregation varies by application area and modeler.

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..n ShoeStore. What ever that might mean.

Regarding multiplicities: pp. 34 of UML 2.5 says

A multiplicity with zero as the lower bound and an unspecified upper bound may use the alternative notation containing a single star “*” instead of “0..*” multiplicity.

余生一个溪 2025-02-02 11:03:32

1多重性是1..1的定义快捷方式,这意味着shoestore的每个实例必须最小并且最多1个实例Nikeshoe

反向*多重性是0 ..*的定义快捷方式,这意味着nikeshoe的实例可以是最低零件,并且最大shoeshop的实例。

The 1 multiplicity is a defined shortcut for 1..1, meaning that every instance of ShoeStore must have at minimum and and maximum 1 instance of NikeShoe.

The reverse * multiplicity is a defined shortcut for 0..* which means that an instance of NikeShoe can be part minimum 0 and maximum an infinity of instances of ShoeShop.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文