UML diagram Overview

Source: Internet
Author: User

UMLIncludes some graphical elements that can combine charts.

1. Class Diagram

A class (ClassIs a class or a group of things with similar attributes and common behaviors.

The rectangular box represents the icon of the class, which is divided3Regions. The top area is the class name, the middle area is the class attribute, and the column in the bottom area is the class operation.

For example, a washing machine ( Processing Machine Such as the brand ( Brand name ), Model ( Model name ), Serial number ( Serial number ) And capacity ( Capacity . The behaviors of such things include ( Add clothes ) "," Add detergent ( Add detergent ) "," Boot ( Turn on ) And ( Remove clothes .

2. Object graph

Object (Object) Is an instance of a class and a specific thing with a specific property value and behavior. For example, the brand of the washing machine may be"Laundatorium", Model:"Washmeister", The serial number is"Gl57774", The maximum washing weight is16LbsClothing.

The icon of the object is also a rectangle, which is the same as the icon of the class, but must be underlined under the object name. The instance name is on the left of the colon and the class name of the instance is on the right of the colon.

3. Use case diagram

Use Case (Use CaseIs a description of system behavior from the user's point of view.

For example, a person uses a washing machine to wash clothes (Wash clothes).

The intelligent humanoid representing the washing machine user is called a participant (Actor). Elliptical represents a use case.

A participant (the entity that initiates a case) can be a person or another system.

4. Status chart

A washing machine can be soaked (Soak), Washing (Wash), Rinse (Rinse), Dehydration (Spin) Or shut down (Off) Status.

The top symbol indicates the start state, and the bottom symbol indicates the end state.

5. Sequence Diagram

Static structure of a real system with large class charts and object icons. In a running system, interaction between objects takes some time.UMLThe formal time-based Dynamic Interaction expressed in the sequence diagram.

For example, the component of the washing machine includes a water injection inlet pipe (Water Pipe), A washing tank for clothing (DrumAs a drain pipe (Drain). Assume that the "add clothes", "Add detergent", and "Start Up" operations have been completed. The use case for laundry is executed in the following order:

1Water Injection in the washing tank through the inlet pipe.

2Washing cylinder holding5The minute is still.

3When the water is fully filled, stop the water injection.

4Round-trip rotation of Washing Tank15Minutes.

5Drain the drain to remove the dirty water after washing.

6Start filling again.

7The washing cylinder continues rotary washing.

8Stop injecting water into the washing machine.

9Remove the water from the rinse through the drain.

10Washing cylinder speed up single direction Rotation5Minutes.

11The washing cylinder stops rotating and the laundry process ends.

In the figure, messages sent between objects are: inject new water (Send fresh water), Keep static (Remain stationary), Stop the water injection (Stop), Round-trip rotation (Ratate back and forth), Remove the dirty water after washing (Send soapy water), Remove the rinse water (Send RINSE WATER.

6. Activity diagram

The activities in use cases and objects are usually in chronological order.


7. Collaboration Diagram

The purpose of the system is to collaborate with each other by the components in the system. In this example, an Internal timer (Internal timer). After a period of time, the timer stops the water injection and starts the round-trip rotation of the Washing cylinder. The sequence number in the figure indicates the order in which the command messages are sent.

8. Component Diagram

The component diagram and deployment diagram are closely related to the entire computer system.

9. Deployment Diagram

UMLThe deployment diagram shows the physical architecture based on the computer system. It can describe computers and devices, display the connections between them, and the software that resides on each machine. Each computer uses oneCubeThe connections between cubes represent the communication relationships between these computers.

 

If you want to group the organizational elements in the graph or show that some classes or components are part of a specific subsystem in the graph, you can organize these elements into packages (Package. The package is represented by a highlighted clip icon.

Note (NoteThe icon is a rectangle with a fold angle, and the rectangle is an explanatory text. A dotted line is used to connect the annotated and annotated graph elements.

Constructor (Stereotype) Can use existingUMLTo customize new elements. The constructor is represented by a name enclosed by angle pairs. This bracket is called a pair of angle brackets (Guillemets).

 

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.