UML diagram drawing

Source: Internet
Author: User

I entered school in September and graduated in July. It ended my pleasant and rich college life at the Software Institute. This series is a review of the four-year study of professional courses, see: http://blog.csdn.net/xiaowei_cqu/article/details/7747205

UML is short for Unified Modeling Language (Unified Modeling Language. UML is a product in software-intensive systems (various products generated during software development, such as models, source code, and test cases) A language that visualizes, details, constructs, and documents.
UML is a set of representation systems. UML is composed of a group of diagrams that allow system analysts to use this standard to build a multi-view system blueprint that can be understood by customers, programmers, and anyone involved in program development. Different risk owners usually use different types of graphs to communicate with each other.
UML has the following features: Unified Standard: UML has been accepted by OMG as a standard modeling language, object-oriented, visual, and expressive, independent of the Process, clear concept, and concise modeling representation, clear graphical structure and easy to use
UML contains nine types of diagrams:
Class diagram, object diagram, use case diagram, state diagram, sequence diagram, activity diagram, collaboration diagram, component diagram, and deployment diagram [system use case diagram] use cases are a set of application scenarios of the system. Each scenario describes the sequence of an event. Each sequence is initiated by one person, another system, one hardware device, or the passage of time. The entity that initiates the event sequence is called the participant ). A use case is a text description sequence of the interaction process performed when a participant (actor) uses a function of the system.
UML representation:
  • Use Case in an elliptical form
  • Participants are represented by the vertical icon
  • The initiator of the use case is on the left side of the use case diagram, and the receiver is on the right side of the use case diagram.
  • The associated line connects the participants and use cases and indicates that the participants and use cases have a communication relationship. The associated line is a solid line.

Rational Rose:
Create a participant create a use case related to the participant
And establish contactsThe following figure shows the system use cases:The following table lists the participants and use cases in the table]

Interaction between objects occurs in a specific order. The interaction sequence in a specific order takes a certain period of time from the beginning to the end. When creating a system, you must specify the interaction sequence. The sequence diagram is the UML component used to complete this task.
UML representation:

  • The object is represented by a rectangle, where the object name is underlined.
  • The time is represented by a vertical dotted line.
  • Messages are displayed in a straight line with arrows.
  • Use a narrow rectangle to indicate Activation

Rational Rose:
Right-click the use case "add item to shopping cart" and select "add"-> "sequence digoal". First, the object will be used in the use case.

Create an objectmessage between objects

The sequence diagram is as follows:[Collaboration diagram]

A collaboration diagram is an extension of an object diagram. In addition to the association between objects, the collaboration diagram also shows message transmission between objects. An object graph is a snapshot, while a collaboration graph is a movie.
UML representation:

  • The arrow line near the correlation line indicates the messages transmitted between objects, and the arrow points to the message receiving object.
  • The message name and sequence number are attached near the arrow line. A message is generally used to trigger the object receiving the message to execute an operation.

Rational Rose:

Use Case chart press F5 to directly generate the collaboration diagram as follows: The detailed sequence diagram is as follows: Generate a collaboration diagram:Generate the following file in the directory: the class graph is a class or a group of things with similar properties and common behavior.
UML representation:
  • Rectangular Box
  • It is divided into three areas: class name, class attributes, class operations
  • A class name consists of multiple words. Each word must have an uppercase letter and no space between words.
  • The property name and operation name are similar, but the first letter is not capitalized.
  • Each operation name is followed by a pair of parentheses.

Rational Rose: Draw the relationships between different types and types in the diagram.

Analyze the classes used in "add item to shopping cart" and create "class digoal" and "add item to shopping cart" in the logical view"

The class diagram is as follows:Create the main class chart "Main": boudaries, control, entities three packages are generated in the logical three folders: drag the corresponding class to the corresponding folder: A state chart shows a person or thing as a State. When the system interacts with users (or other systems), the objects that constitute the system undergo necessary changes to adapt to the interaction. If you want to establish a model for the system, this change must be reflected in the model.
UML representation:

  • The status is represented by a rounded rectangle.
  • A solid line with an arrow in the status indicates the migration (transfer) of the status, and the arrow points to the target status.
  • A solid circle indicates the starting point of state transfer, and an eye circle indicates the ending point.

Rational Rose:
Create a "statechart divisor" under the product item class to draw the product status chart.
Draw the "Start" status, and draw various statuses and transitions in sequence. Finally, it indicates the end.

The following figure shows the status chart:The generated directory is as follows: [component diagram]

A component is a physical and replaceable part of the system that follows a set of interfaces and provides its implementation. A component diagram shows a group of components and their relationships, including dependencies between components during compilation, linking, or execution. The component diagram and deployment diagram are used to achieve physical modeling in the OO system.
UML representation:

  • A large rectangle box with two small rectangles on the left side. It can also be represented by a rectangle with the keyword component on the top.
  • The component has its own name. If the component belongs to a package, you can add the package name before the component name.
  • You can list component operations in the component icon.

Rational Rose:
Create a component in "component View" and draw various relationships between components.The system component diagram is as follows:Create a component map "Main", create three packages, and generate three corresponding folders. Put the corresponding components into the folder. In order to display the component in each package, create a component map "Main" under the corresponding directory"
The file directory is as follows: the main component diagram of boundaries is as follows: the main component diagram of control is as follows: the main component diagram of entities is as follows: [deployment diagram]

The deployment diagram describes the physical topology of the system hardware and the software components executed on this structure. The deployment diagram is also called the configuration diagram and the implementation diagram. It is often used to help understand distributed systems. The deployment diagram is described by architecture designers, network engineers, and System Engineers.
UML representation:

  • Represented by cubes
  • Add keywords <device>

Rational Rose:
Draw processor and device in deployment under commonent View

The system deployment diagram is shown as follows:Result Analysis
  1. UML is the abbreviation of unified modeling language. UML is a product in software-intensive systems (various products generated during software development, such as models, source code, and test cases) A language that visualizes, details, constructs, and documents.
  2. The visual diagrams in UML include: Use Case view, logical view, implementation view, process view, and deployment view). Composed of nine Images
  3. Experiment by understanding the various ways of drawing a graph in Rational Rose, deepen the understanding of the meaning of the graph and the relationship between various graphs.
Reprinted please indicate the source: http://blog.csdn.net/xiaowei_cqu/article/details/7773814

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.