多重性的 UML 语法是什么? (班级框内)
我知道可以在同一类框中指定多重性,而不必绘制到另一个类的链接。
我的问题是,多重性应该放在哪里,在名称之后还是在类型之后?
是:
可见性名称多重性:类型
为
+ clients [0..n] : Client
还是
可见性名称:类型多重性
,因为
+ clients : Client [0..n]
我有两本书(Larman 的《Applitying UML and Patterns》和 UML 以及 Arlow 的《Unified process》和纽施塔特)但它们有所不同
I know it is possible to specify the multiplicity within the same class box, without having to draw the link to another class.
My question is, Where should the multiplicity go, after the name or after the type?
Is it:
visibility name multiplicity : type
as
+ clients [0..n] : Client
or
visibility name : type multiplicity
as
+ clients : Client [0..n]
I have two books (Applitying UML and Patterns by Larman and UML and the Unified process by Arlow and Newstadt ) but they differ
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
摘自 UML 2.2 Superstruction OMG 规范
MORE 来自多重元素规范的示例,位于打印页 97。
规范中关于多重性的示例。
Pulled from printed page 107 of the UML 2.2 Superstructure OMG Specificiation
MORE Examples from the multiplicity element spec, on printed page 97.
Example from Spec on multiplicity.
UML 语法是一种图解语法。 中的多重性示例
请参阅http://www.ibm 。 com/developerworks/rational/library/content/RationalEdge/sep04/bell/
图 6:Flight 类和 Plane 类之间双向关联的示例
UML syntax is a diagrammatic syntax. See this multiplicity example from
http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/
Figure 6: An example of a bi-directional association between a Flight class and a Plane class