“UML Modeling Language”
This article has participated in the activity of “New person creation Ceremony”, and started the road of digging gold creation together
-
The place of UML class diagrams in actual development is self-evident. When we get a requirement, the first thing we should do is to give the technical solution. According to the technical solution to achieve specific functional details can not only ensure that the general process to do know, even if there is a temporary change only to change the technical solution is not prone to mistakes. In the actual development, many students including themselves write wherever they want, which is not friendly and not recommended.
A class diagram in unified Modeling Language (UML) is a static structure diagram used to build and visualize a graphical representation of an object-oriented system. The main content of the description is: class, attribute, operation (method), the association between objects.
“Principal Relationship representation”
1. Inheritance is called Generalization.
Connect them with solid lines and hollow triangular arrows. It can be understood as the relationship between a more concrete implementation and a general abstraction, that is, a specific implementation inherits a general implementation. If animals are at the top of the class, then birds are also animals, and below that are specific birds. Represents an IS-A relationship, and the name of the abstract class specifies italics.
2. The implementation Realization
Instead of inherits solid lines, implementations use dotted lines joined by hollow triangular arrows. Colloquially understood as the relationship between an interface and an implementation class.
A. Aggregation B. Aggregation C. Aggregation D. Aggregation
Hollow diamond connection. A special type of association, has-A, can be understood as the relationship between the part and the whole, as between A shoal of fish and an individual fish, whose life cycle is independent. The loss of one fish in a shoal has negligible effect on the shoal.
4
Solid diamond connection is a special polymerization relationship with the same life cycle. Contains – A is a strong relationship.
I don’t want to fall in love with you
A usage relationship in which a class uses another class as a parameter or return value. There is also a special kind of dependency – association relationship: usually a class contains another class as an attribute.
“Good UML template”
UML diagrams that contain common design patterns are ideal for iterative learning.