UML箭头说明 [英] Explanation of the UML arrows

查看:164
本文介绍了UML箭头说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在研究UML,并在类之间使用普通的普通箭头绘制简单的图,但是我知道这还不够.还有很多其他箭头:概括,实现等,它们对图阅读器有意义.

I have recently been studying UML and drawing simple diagrams with ordinary plain arrows between classes, but I know it's not enough. There are plenty of other arrows: generalization, realisation and etc. which have meaning to the diagram reader.

是否有很好的资源可以解释每个箭头(普通,普通,点缀,菱形,菱形)?

Is there a nice resource which could explain each arrow (ordinary, plain, dotted, diamond-filled, diamond)?

如果它将为他们提供一些代码示例,那将是最好的.

It would be the best if it will have some code examples for them.

推荐答案

以下是Visual Studio 2015文档中的一些解释:

Here's some explanations from the Visual Studio 2015 docs:

UML类图:参考: https ://msdn.microsoft.com/library/dd409437%28VS.140%29.aspx

5 :关联:两个分类器的成员之间的关系.

5: Association: A relationship between the members of two classifiers.

5a :聚合:表示共享所有权关系的关联.这 所有者角色的 Aggregation 属性设置为 Shared .

5a: Aggregation: An association representing a shared ownership relationship. The Aggregation property of the owner role is set to Shared.

5b :组成:表示整体关系的关联. 汇总 所有者角色的属性设置为复合.

5b: Composition: An association representing a whole-part relationship. The Aggregation property of the owner role is set to Composite.

9 :通用化:特定分类器从通用分类器继承其定义的一部分 分类器.通用分类器位于连接器的箭头端.属性,关联和 操作由特定分类器继承.使用继承工具创建一个 两个分类器之间的概括.

9: Generalization: The specific classifier inherits part of its definition from the general classifier. The general classifier is at the arrow end of the connector. Attributes, associations, and operations are inherited by the specific classifier. Use the Inheritance tool to create a generalization between two classifiers.

13 :导入:程序包之间的关系,表示一个 程序包包含另一个的所有定义.

13: Import: A relationship between packages, indicating that one package includes all the definitions of another.

14 :依赖关系:如果发生以下情况,依赖分类器的定义或实现可能会更改 箭头末端的分类器已更改.

14: Dependency: The definition or implementation of the dependent classifier might change if the classifier at the arrowhead end is changed.

15 :实现:该类实现接口定义的操作和属性. 使用继承工具在类和接口之间创建实现.

15: Realization: The class implements the operations and attributes defined by the interface. Use the Inheritance tool to create a realization between a class and an interface.

16 :实现:具有相同关系的另一种表示形式.上的标签 棒棒糖符号标识界面.

16: Realization: An alternative presentation of the same relationship. The label on the lollipop symbol identifies the interface.

UML类图:准则: http ://msdn.microsoft.com/library/dd409416%28VS.140%29.aspx

协会的财产

聚集:这在连接器的一端显示为菱形.你可以用它来 表示处于聚合角色的实例拥有或包含其他实例.

Aggregation: This appears as a diamond shape at one end of the connector. You can use it to indicate that instances at the aggregating role own or contain instances of the other.

可导航:如果仅对一个角色为true,则会在可导航方向上显示一个箭头.您可以使用 这表示该软件中链接和数据库关系的可导航性.

Is Navigable: If true for only one role, an arrow appears in the navigable direction. You can use this to indicate navigability of links and database relations in the software.


通用化:通用化是指特殊化类型或派生类型继承属性, 操作,以及常规或基本类型的关联.常规类型出现在箭头上 关系结束.

Generalization: Generalization means that the specializing or derived type inherits attributes, operations, and associations of the general or base type. The general type appears at the arrowhead end of the relationship.

实现:实现是指一个类实现由指定的属性和操作 接口.该接口位于连接器的箭头端.

Realization: Realization means that a class implements the attributes and operations specified by the interface. The interface is at the arrow end of the connector.

如果您还有其他问题,请告诉我.

Let me know if you have more questions.

这篇关于UML箭头说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆