zoukankan      html  css  js  c++  java
  • 【UML】-NO.40.UML.1.UML.1.001-【UML】- uml

    1.0.0 Summary

    Tittle:【UML】-NO.40.UML.1.UML.1.001-【UML】- uml

    Style:DesignPattern

    Series:DesignPattern

    Since:2017-11-02

    End:....

    Total Hours:...

    Degree Of Diffculty:2

    Degree Of Mastery:2

    Practical Level:2

    Desired Goal:2

    Archieve Goal:....

    Gerneral Evaluation:...

    Writer:kingdelee

    Related Links:

    http://www.cnblogs.com/kingdelee/

    https://www.uml-diagrams.org/uml-25-diagrams.html 

    0.UML 2.5 Diagram

    1.Package Diagram

    Package diagrams are used to reflect the organization of packages and their elements. When used to represent class elements, package diagrams provide a visualization of the namespaces. The most common use for package diagrams is to organize use case diagrams and class diagrams, although the use of package diagrams is not limited to these UML elements.

    包图用于反映包及其元素的组织。当用于表示类元素时,包图提供了名称空间的可视化。包图最常见的用途是组织用例图和类图,尽管包图的使用并不局限于这些UML元素。

    2.Component Diagram

    Component diagrams illustrate the pieces of software, embedded controllers, etc., that will make up a system. A component diagram has a higher level of abstraction than a Class Diagram - usually a component is implemented by one or more classes (or objects) at runtime. They are building blocks so a component can eventually encompass a large portion of a system.

    组件图说明了软件、嵌入式控制器等组成了一个系统。组件图比类图具有更高的抽象级别——通常组件是由一个或多个类(或对象)在运行时实现的。它们是构建块,因此组件最终可以包含系统的很大一部分。

     

    3.Class Diagram

    类图显示了任何面向对象系统的构建块。类图描述模型的静态视图,或模型的一部分,描述它所拥有的属性和行为,而不是详细描述实现操作的方法。类图在说明类和接口之间的关系方面最有用。泛化、聚合和关联在反映继承、组合或使用和连接方面都是有价值的。

     

    Class Notation

    Interface

    An interface is a specification of behavior that implementers agree to meet; it is a contract. By realizing an interface, classes are guaranteed to support a required behavior, which allows the system to treat non-related elements in the same way – that is, through the common interface.

    Interfaces may be drawn in a similar style to a class, with operations specified, as shown below. They may also be drawn as a circle with no explicit operations detailed. When drawn as a circle, realization links to the circle form of notation are drawn without target arrows.

     Tables

    Although not a part of the base UML, a table is an example of what can be done with stereotypes. It is drawn with a small table icon in the upper right corner. Table attributes are stereotyped «column». Most tables will have a primary key, being one or more fields that form a unique combination used to access the table, plus a primary key operation which is stereotyped «PK». Some tables will have one or more foreign keys, being one or more fields that together map onto a primary key in a related table, plus a foreign key operation which is stereotyped «FK».

    Association

     An association implies two model elements have a relationship - usually implemented as an instance variable in one class. This connector may include named roles at each end, cardinality, direction and constraints. Association is the general relationship type between elements. For more than two elements, a diamond representation toolbox element can be used as well. When code is generated for class diagrams, named association ends become instance variables in the target class. So, for the example below, "playsFor" will become an instance variable in the "Player" class.

    关联意味着两个模型元素有关系——通常在一个类中作为实例变量实现。这个连接器可能包括每个端点的命名角色、基数、方向和约束。关联是元素之间的一般关系类型。对于超过两个元素,还可以使用菱形表示工具箱元素。当为类图生成代码时,命名关联在目标类中变成实例变量。因此,在下面的示例中,“playsFor”将成为“Player”类中的一个实例变量。

     

    Generalizations

    A generalization is used to indicate inheritance. Drawn from the specific classifier to a general classifier, the generalize implication is that the source inherits the target's characteristics. The following diagram shows a parent class generalizing a child class. Implicitly, an instantiated object of the Circle class will have attributes x_position, y_position and radius and a method display(). Note that the class "Shape" is abstract, shown by the name being italicized.

    泛化用于表示继承。从特定的分类器到一般的分类器,概括的含义是源继承了目标的特征。下图显示了父类对子类的一般化。隐式地,Circle类的实例化对象将具有属性x_position、y_position和radius以及一个方法display()。请注意,类“形状”是抽象的,它显示的名称是斜体的。

     

    The following diagram shows an equivalent view of the same information.

     

    Aggregations

    Aggregations are used to depict elements which are made up of smaller components. Aggregation relationships are shown by a white diamond-shaped arrowhead pointing towards the target or parent class.

    聚合用来描述由较小的组件组成的元素。聚集关系由指向目标或父类的白色菱形箭头表示。

    A stronger form of aggregation - a composite aggregation - is shown by a black diamond-shaped arrowhead and is used where components can be included in a maximum of one composition at a time.
    一种更强的聚合形式——复合聚合——由一种黑色菱形箭头所示,并且在每次最多只能包含一种成分的情况下使用。

    If the parent of a composite aggregation is deleted, usually all of its parts are deleted with it;
    如果复合聚合的父节点被删除,则它的所有部分通常都被删除;

    however a part can be individually removed from a composition without having to delete the entire composition.
    然而,一个部分可以单独从一个组合中删除,而不需要删除整个组合。

    Compositions are transitive, asymmetric relationships and can be recursive.
    组成是传递的,不对称的关系,可以是递归的。

    The following diagram illustrates the difference between weak and strong aggregations.
    下图说明了弱聚合和强聚合之间的区别。

    An address book is made up of a multiplicity of contacts and contact groups.
    地址簿是由多个联系人和联系组组成的。

    A contact group is a virtual grouping of contacts;
    联系小组是一组虚拟的接触者;

    a contact may be included in more than one contact group.
    一个接触可以包括在多个接触小组。

    If you delete an address book, all the contacts and contact groups will be deleted too;
    如果你删除了通讯录,所有的联系人和联络小组也将被删除;

    if you delete a contact group, no contacts will be deleted.
    如果您删除了一个联系人组,则不会删除任何联系人。

    Association Classes

    An association class is a construct that allows an association connection to have operations and attributes.
    关联类是一个构造,允许关联连接具有操作和属性。

    The following example shows that there is more to allocating an employee to a project than making a simple association link between the two classes: the role the employee takes up on the project is a complex entity in its own right and contains detail that does not belong in the employee or project class.
    下面的例子显示,有更多的员工分配一个项目比制作一个简单的协会之间的联系两个类:角色的员工占用项目本身是一个复杂的实体和包含细节不属于员工或项目类。

    For example, an employee may be working on several projects at the same time and have different job titles and security levels on each.
    例如,一个员工可能同时在多个项目上工作,并且在每个项目上都有不同的工作头衔和安全级别。

    Dependencies
    A dependency is used to model a wide range of dependent relationships between model elements. It would normally be used early in the design process where it is known that there is some kind of link between two elements, but it is too early to know exactly what the relationship is. Later in the design process, dependencies will be stereotyped (stereotypes available include «instantiate», «trace», «import», and others), or replaced with a more specific type of connector.

    Traces
    The trace relationship is a specialization of a dependency, linking model elements or sets of elements that represent the same idea across models. Traces are often used to track requirements and model changes. As changes can occur in both directions, the order of this dependency is usually ignored. The relationship's properties can specify the trace mapping, but the trace is usually bi-directional, informal and rarely computable.

    Realizations
    The source object implements or realizes the destination. Realizations are used to express traceability and completeness in the model - a business process or requirement is realized by one or more use cases, which are in turn realized by some classes, which in turn are realized by a component, etc. Mapping requirements, classes, etc. across the design of your system, up through the levels of modeling abstraction, ensures the big picture of your system remembers and reflects all the little pictures and details that constrain and define it. A realization is shown as a dashed line with a solid arrowhead.

    Nestings
    A nesting is connector that shows the source element is nested within the target element. The following diagram shows the definition of an inner class, although in EA it is more usual to show them by their position in the project view hierarchy.

     

  • 相关阅读:
    20151224:Web:CheckBoxList 控件:去重显示 ;复选框多选时可点击查询查出结果
    20151223:Web:审核:审核和取消
    20151223:Web:审核:主页面
    20151223:Web:审核:登陆
    20151223:Web:审核:注册
    20151221:Web复习:删除
    练习!!年月日判断并输出第多少天
    枚举,函数
    练习!!输入学生信息
    结构体
  • 原文地址:https://www.cnblogs.com/kingdelee/p/7794274.html
Copyright © 2011-2022 走看看