UML class diagram symbol

Source: Internet
Author: User

Address: http://developer.51cto.com/art/201006/205392.htm

This section briefly introduces the UML class diagram symbols, each of which has different meanings. I hope you will have some knowledge about the UML class diagram symbols through this section, next let's take a look at the detailed introduction of UML class diagram symbols.

UML class diagram symbol Software Engineering

1. generalization (inheritance)

The solid arrow indicates that a base class B inherits Class.

2. Implementation

The dotted arrow in the UML class diagram symbol indicates implementing an interface: Class C implementation interface (now it seems to be displayed as a line without an arrow)

3. Association

The Association in UML class diagram symbols is divided into one-way and two-way Association.

Association and class attributes are very similar.

3.1 unidirectional Association: only one class can be accessed from one class (the former has the latter attribute)

Class B unidirectional Association Class A (Class B has an object whose property A is)

3.2 bidirectional Association: two classes can access each other (both attributes of the two classes have the other)

Class B associates Class A (Class B has an object whose property A is)

Class A is associated with Class B (Class A has the attribute BS as set, and set contains the objects of Class B)

A and B are 1-to-n (n> 0) associations.

3.3 aggregation relationship

It is known that the wheel class plays the role of wheels and aggregates four to the car object.

The hollow diamond in the UML class diagram symbol indicates that the wheel object is not created and destroyed with the creation of the car.

3.4 composite relationship

The company class is completely composed of Department objects.

The central diamond in the UML class diagram symbol indicates that the Department object is created and destroyed along with the creation of the company object.

4. Dependency

The dependencies in UML class diagram symbols refer to the call relationships between classes. In UML, they are represented by arrows with dotted lines. If the Class A contains the attributes or methods of Class B,

Or Class A is responsible for instantiating Class B, so Class A depends on Class B. Unlike associations, you do not need to define B-type attributes in Class.

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.