Diagrams in UML

Source: Internet
Author: User
Tags dashed line

Use case diagrams, Class diagrams, package diagrams, Sequence diagrams, collaboration diagrams, State diagrams, activity diagrams, Component diagrams, deployment diagrams, etc.

1. Use case diagram

Displays the connections between multiple external actors and their use cases that are provided by the system. A use case is a functional unit in the system that describes the interaction between the actor and the system. The use cases only describe the system functions that the system participants observed from the outside, and do not describe these functions in the system

The concrete implementation of the internal. Use case diagrams are used to list the use cases and participants in the system and to show which participant participates in which use case is executed.

A use case contains six elements:

(1). Participant (actor)-an external entity that participates in some way in the execution of a use case.

There are three main categories of participants:

System users--real people, that is, users

Other Systems-

A process that can run, such as time--

Some of the things that modeling follows

Participants are always external to the system, so they can be outside the control of people.

Participants can interact directly or indirectly with the system, or use the services provided by the system to accomplish something
Works.

Participants represent the role that people and things play in interacting with the system, not on specific people or on specific matters.

A person or thing can play multiple roles simultaneously when interacting with the system

Each participant needs a name that is the same as the business, and it is not recommended to use a name similar to the new participant in modeling

Each participant must have a brief description of what the participant is from a business perspective

As with classes, participants can have properties that represent participants and events that are acceptable, but are not used frequently

(2) Use cases-describe a series of actions performed by a system on a particular role

(3) Association relationship--describe the relationship between the actor and the use case

(4) contains a relationship-contains the behavior of other use cases, and uses the behavior of the use case as part of itself

(5) Extended relationships-incremental expansion of base use cases

(6) Generalization relationship--a use case can be specifically enumerated as one or more child use cases

2. Class Diagram

A class is a description of the concepts in the application domain or application solution. Class diagrams are organized in a class-centric manner, other elements in a class diagram are either part of a class, or are associated with classes. Classes can be interconnected in a number of ways: associations, dependencies, and specializations, which are referred to as relationships between classes. All relationships

The internal structure of each class is displayed in the class diagram. The relationship is represented by a line between the class boxes. Different relationships are distinguished by the modifiers on the line and on the connection port.


3. Object graph

A variant of a class diagram that uses a symbolic description similar to a class diagram, except that the object graph shows multiple object instances of a class rather than the actual class. It can be said that an object graph is an example of a class diagram that shows a possible snapshot of the system execution at a point in time.

The appearance that might be present.
An object graph differs from a class diagram in that it represents an object with an underlined object name, showing all instances in a relationship.

4. State diagram

A supplement to the class description that shows all the states that the class's objects may have, and the events that cause the state to change. The change in state is called a transformation. A state diagram consists of the individual states of an object and the transitions that connect them. Each state satisfies an object in its life cycle.

Modeling of a time period for a given condition. The occurrence of an event occurs when the transition of a state piece causes the object to transition from one state to another. When you are actually modeling, you do not need to draw a state diagram for all classes, only those with some definite state and those states will affect and change

The class of its behavior is necessary to draw the state diagram.

5. Timing Diagram

Displays the action collaboration between multiple objects, focusing on displaying the chronological order in which messages are sent between objects. The time series diagram also shows the interaction between objects, which is what happens at a specified point in time when the system executes. One purpose of a sequence diagram is to represent the sequence of actions in a use case.

When performing a routine, each message in a sequence diagram corresponds to a class operation or trigger event that causes a transition in the state machine.


6. Collaboration diagram

Collaboration diagrams model the chain between objects and objects that are meaningful in one interaction. In addition to displaying the exchange of messages, the collaboration diagram shows the objects and their relationships. Time series diagrams and collaboration diagrams can all represent interactions between objects, but their focus is different. Time series diagram with message

Geometric arrangement relationships to express the chronological order of messages, and the relationships between the roles are implicit. The collaboration diagram represents the relationships between roles using the geometric arrangement of each role and uses messages to illustrate those relationships.

7. Activity diagram

A variant of the state diagram that describes the activities involved in the workflow that executes the algorithm. The action state represents an activity, that is, the execution of a workflow step or an action. The activity diagram consists of multiple action states, and when an action is completed, the state of the action changes to a

New state. In this way, control flows between these interconnected action states.

8. Component Diagram

A code component is used to display code components to display the physical structure of a code, a component can be a source code component, a binary component, or an executable component. A component contains information about one or more logical classes that it implements, depending on the dependencies between the components shown in the component diagram,

It is easy to analyze how a component's changes will affect other family components. Generally speaking, the sequence is actually programmed in the work.

9. Configuration diagram

Used to display the physical structure of the hardware and software in the system. The configuration diagram shows not only the actual computers and devices, but also the types of connections and connections between them. In the configuration diagram, which nodes are displayed, are already running on the split-family node.

UML Model Elements

The model elements in UML include the connection between things and things. Things are an important part of UML, and they represent anything that can be defined. Relationships between things can link things together and form meaningful structural models. Each model element has a corresponding graph

Shape element.

UML things can be divided into structural things, action things, grouping things and annotating things.

Structural Things
(1) Class--an abstraction of an object with the same attributes, methods, relationships, and semantics, a class can implement one or more interfaces. In UML, a class is represented by a moment type that includes the class name, attributes, and methods.

(2) interface-An interface is a set of operations that provide a particular service to a class or component.

(3) collaboration-Defines the interaction operation.

(4) use Case-describes a series of actions performed by the system on a particular role.

(5) Activity Class--an activity class is a class that has one or more processes or threads for a class object.

(6) component-implements a physically replaceable system part of an interface collection.

(7) node--a physical element that exists at run time, represents a computable resource, typically consumes some memory and has the ability to handle it.

Action Things

UML the dynamic part of the model, which is the verb of the model, represents the action of time and space.

(1) interaction-An interaction is an action of a set of objects in a specific context that is composed of a series of message exchanges for a specific purpose.

(2) state Machine--consists of the state of a series of objects.

Grouping things

UML The part of the organization in the model, the grouping of things only one, called the package

Annotate things

UML the comment portion of the model.

UML the relationship in

1) Association Relationship--Association connection element and link instance, which is represented by a solid line that connects two model elements, and the roles and multiplicity tags of the associated parties can be labeled at both ends of the association.

(2) dependency-Describes an element's attachment to another element. A dependency is represented by a dashed line with arrows pointing to the target model with the source model.

(3) A generalization relationship-also known as an inheritance relationship-implies that an element is a special case of another element.

(4) implementing relationships--describing an element implementing another element

(5) Aggregation relationships-describes the relationship between elements and the whole.

UML General mechanism

UML several general-purpose mechanisms make UML simple and easy to use. Using a common mechanism, you can provide additional annotation information or semantics for model elements, and you can expand UML to make it easier to use them in the same way at any time in UML

Retouching--

Notes--

Specification--

General Division--
1. Type--Instance 2 interface--Implement

Extension mechanism--

UML the extension component

Analysis of Library Management system

Identify participants

Borrowing person

Library Manager

System Maintenance Personnel

Borrowers use cases

(1) Landing System
(2) Check your borrowing information
(3) Search for book information
(4) Book Books
(5) Borrowing books
(6) Return of books


Librarian Use Cases
(1) Handling of book borrowing
(2) handling the return of books
(3) Delete booking information

System administrator Use Cases
(1) Check the information of borrowers
(2) Search for book information
(3) Add a bibliography
(4) Delete or update the bibliography
(5) Add books
(6) Delete a book
(7) Add a borrower account
(8) Delete or update the borrower account

Diagrams in UML

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.