A summary of UML class diagram relationships

Source: Internet
Author: User
Tags dashed line

In UML class diagrams, the following relationships are common:

    • Generalization (generalization)
    • Implementation (Realization)
    • Association (Association)
    • Aggregation (Aggregation)
    • Combination (composition)
    • Dependency (Dependency)

The order of strength of the various relationships:

Generalization = implementation > Composition > Aggregation > Association > dependencies

First, generalization (generalization):

The inheritance relationship between classes is generalized.

Arrow pointing to: Solid line with triangular arrows, arrow pointing to Parent class

II. Realization (realization)

class implements the relationship of the interface using the implementation.

Arrow pointing: Dashed line with triangular arrows, arrow pointing to Interface

III. Association (Association)

The owning relationship between classes is associated with.

Arrows and points: solid lines with normal arrows, pointing to the owner

Iv. polymerization (Aggregation)

Aggregation is a weak whole and part of the relationship, the whole can be separated from the partial and exist alone.

"Arrows and points": solid lines with hollow diamonds, diamonds pointing to the whole

Five, combination (composition)

The combination is a strong whole and part of the relationship, the whole can not be separated from part of the existence.

Arrows and points: solid lines with solid diamonds, diamonds pointing to the whole

Vi. Dependence (Dependency)

Dependency is a relationship that is used.

Arrows and points: dashed lines with arrows pointing to the user

7. Summary

A complete UML class diagram.

A summary of UML class diagram relationships

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.