Several relationships of UML class diagrams self-summarizing, (entry level)

Source: Internet
Author: User
Tags dashed line

This will be accompanied by my understanding of some graphical meanings.

1. Generalization.

Relationship: Actually it is inheritance, this is better understanding. For example: birds inherit animals.

Implementation: With the solid line of the triangular arrow, the direction of the arrow points to the parent class.

2. Implementation.

Relationship: This is the main pair of interfaces. class implements the interface. For example, the bird realizes the function of flying.

Implementation: A dashed line with a triangular arrow and an arrow in the direction of a straight interface.

3. Association.

Relationship: The individual understands that this is the relationship between classes and classes, which enables a class to know the properties and methods of another class. This can be unidirectional or bidirectional. For example: the relationship between penguins and climate.

Implementation: A solid line with a normal arrow, and if there is an arrow, it points to the owning person.

4. Aggregation.

Relationship: is a whole and a part of the relationship, part of the left after the whole can also be run alone. For example: the relationship between Bird and bird group.

Realization: With hollow diamond solid line, Diamond point to the whole

5. Combination.

Relationship: The relationship between the whole and the part. But unlike aggregations, the parts here are inseparable from the arrangement. For example: The wings cannot be alone and must depend on the bird. Of course, in this logic, you say braised chicken wings, that relationship is not the same.

Implementation: With solid diamond solid line, Diamond point to the whole. (Strong relationship, of course, the solid, right?) haha

6. Reliance.

Relationship: Dependency is a usage relationship. So, do not rely on each other. It's more troublesome to deal with. Duties are not singular. For example, animals cannot live without water and oxygen.

Implementation: Use the dashed arrow to point to the user.

Associated Strong and weak relationships: generalization = implementation > Composition > Aggregation > Association > Dependencies

Reference article: http://blog.csdn.net/dragonpeng2008/article/details/6836448

Several relationships of UML class diagrams self-summarizing, (entry level)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.