UML Study Notes (III)

Source: Internet
Author: User

Unified Modeling Language (UML)

Some terms:

A system is a combination of hardware and software that provides solutions to business problems.

System development is a process of establishing a system for the customer.

The customer (client) is the person who needs to solve the problem.

The System Analyst (Analyst) compiles the problem to be solved by the customer into a document and transfers the document to the developer.

Developers are programmers who construct software and implement it on computer hardware to solve customer problems.

 

Composition of UML

UML includes some graphical elements that can combine charts.

1. Class Diagram

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

The rectangular box represents the icon of the class, which is divided into three areas. 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, all things of the washing machine class have brands name, model name, serial number, and capacity). Actions of such things include "add clothes", "Add detergent", "turn on", and "remove clothes).

2. object graph

An object is an instance of a class and a specific thing with a specific property value and behavior. For example, the washing machine brand may be "laundatorium", the model is "too Meister", and the serial number is "gl57774". A maximum of 16 lbs of clothes can be washed at a time.

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 is 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 intellectual humanoid representing the washing machine user is called an 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 in the soak, wash, rinse, spin, or off state.

 

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. The formal time-based Dynamic Interaction expressed in the UML sequence diagram.

For example, the component of the washing machine includes a water pipe for water injection, a washing tank for clothing (drum) to a 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:

1. Use the inlet pipe to add water to the washing tank.

2. The washing cylinder remains static for 5 minutes.

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

4. The washing cylinder is rotated back and forth for 15 minutes.

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

6. Start the water injection again.

7. The washing cylinder continues round-trip rotary washing.

8. stop injecting water into the washing machine.

9. drain the water from the Rinse clothes.

10 washing cylinder speed up single direction rotation for 5 minutes.

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

In the figure, messages sent between objects include: Send fresh water, remain stationary, stop, and ratate back and forth), remove the dirty water after washing (send soapy water), remove the rinse water (send rinse water) and so on.

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) is added to the class set of the washing machine component ). 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

The UML 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 is represented by a cube, and the line between cubes represents the communication relationship 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, you can organize these elements into packages. The package is represented by a highlighted clip icon.

The note 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.

The constructors can use existing UML elements to customize new elements. The constructor is represented by a name enclosed by Angle brackets, which are called 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.