Object will be the development of UML class diagrams for

What is 1 UML class diagram

       In the long ago seen the class diagram in the book, but did not know specifically what is called, meaning the class diagram for the pictures in the book described is scanty, we did not really understand classes and class between the author to express Relationship. Following the cut from the book is a UML class diagram is described ConnectionManager class implements the interface IConenectionManager (generalization), the DataTransfer IDataTransfer class implements an interface (generalization), and Phone ConnectionManager classes and classes, class the DataTransfer constitute combination relation.

 

Class 2 and class relations

       Read a large part of the class diagram is to understand the relationship between class and class, it can be divided into the following six:

2.1 Generalization (Generalization)

       Generalization, then, is inherited in the standard java language, the basketball player with such athletes to inherit this class is a generalization relationship. Videos are implemented with a white arrow in FIG UML class, which points to the parent element.

2.2 realization (Realization)

       Achieve, aircraft aircraft to achieve this interface, this is achieved, corresponding to the java language implements. The broken line in the UML class diagram relations implemented painted with a hollow arrow.

2.3 dependency (the Dependency)

       Dependence is a semantic relationship between two things, one thing (separate transaction) changes will affect another transaction (a transaction dependent) semantics, such as car-dependent mobile GPS navigation. In UML class diagram may be drawn as a broken line with a direction.

2.4 association (Association or)        

      It describes the associated connection (2.5 polymerizable describes a special association) between the object and the objects, such as large trucks parked garage and it is a kind of relationship. Using UML class diagram showing a straight line.

2.5 polymerization (Aggregation)

       Aggregation is associated with a particular type, and it describes the overall structure of the relationship between the part, such as a large truck and the engine is a polymeric relationship. In UML class diagram by a straight line with open diamonds represents the arrows. As shown, the engine comprising represents truck.

2.6 组合(composition)

      组合与聚合的相同处在于都表示了整体与部分的联系,而不同之处就是在组合关系中,如果A包含了B,如果A不存在了,B也就不存在了。在UML类图中用一条带实心的菱形箭头的直线表示。如图所示,超跑由定制的尾翼组成,一旦该超跑报废,尾翼也随之无用。

发布了48 篇原创文章 · 获赞 52 · 访问量 2万+

Guess you like

Origin blog.csdn.net/y506798278/article/details/100831871