Relationship in UML-class diagram relationship

Source: Internet
Author: User

Overview

The relationships in a UML class diagram include:

Association, aggregation, composition, dependency, generalization, and Realization)

 

Association(Association)

Line representation, optional arrows,

Is a relationship in a static structure, which tends to be a data relationship. The relationships in this static structure will be stored with the storage of class files. If one class is the object of another class, the two classes are previously associated. As shown in:

  1. Public class usermanage {
  2. Private userinfo;
  3. }

Aggregation)

It is expressed by solid line, and the aggregation end has a hollow diamond.

Aggregation is a special association and has the meaning of whole-part.
Aggregation: A contained relationship, such as the team and people, the fruit basket, and the fruit in it. That is, individuals get together to become the whole.
Composition: a strong inclusion relationship that has a common life cycle. Such as houses and walls, cars and wheels
It is represented by a solid diamond object attached to the component end.

Composition)
Generalization can be understood by inheritance.

 

Dependency)

 

 

Generalization
Generalization can be understood by inheritance.

Implementation
Implementation can be understood through class implementation Interface

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.