UML Summary (understanding of nine types of graphs and how to use Rational Rose to draw images)

Source: Internet
Author: User

UML is a modeling language and a standard for system modeling. The reason for modeling is that large-scale system design is quite complex. When the system is complex, the following problems are involved:

    • How do developers communicate with users to understand system requirements?
    • How do developers communicate with each other to ensure seamless collaboration between different departments?

  • UML is the first choice for modeling when constructing a special model. It describes the requirements and design of the system. When modeling a complex project, A system can be described by a single image. However, a single image cannot contain all the information required by a large system, and cannot describe the overall structure of the system, in this way, we can hardly use a single image for modeling. UML can describe the system from different angles. It provides nine types of diagrams. Below we will use a diagram to compare thisUse of nine types of Graphs.

     

     


     

     

    After completing the nine graph functions, let's take a look at how to use the tool to create a graph,The tool used isRational Rose.

     

    Use Case using Rational Rose)


    1. Right-click the use case View package in the browser box and a shortcut menu is displayed;
    2. Select the new -- Use Case item;
    3. Enter the name of the use case. (If an error occurs, use the RENAME command to change the name)
    4. If the document window is invisible, select the view-documentation menu at the top of the screen;
    5. Select the required use case in the browser box;
    6. Place the cursor in the document box and enter the corresponding document.

     

    Through the above learning, we learned the specific operation steps for creating a graph using Rational Rose. The creation methods for other types of graphs are similar. Remember the corresponding words.

    1. Use case diagram: Use Case digoal
    2. Class diagram: Class digoal
    3. Object graph: Object digoal
    1. Status chart: State Divisor
    1. Sequence diagram: sequence digoal
    2. Collaboration diagram: Collaboration digoal
    3. Component diagram: component digoal
    4. Deployment diagram: Deployment digoal
    5. Activity diagram: Activity digoal

     

    Next, let's get to knowHow to UseThe model provided by Rational Rose draws a picture that others can understand at the same time.

     

    1. use case diagram

     

    1. Double-click the main entry in the use case View package in the browser box to open the main use case diagram;
    1. Click the performer in the browser box and drag it to the main use case chart;
    1. Repeat Step 2nd until the required work is completed;
    1. Click the use case in the browser box and drag it to the main use case diagram;
    1. Repeat Step 4th until the required work is completed;
    2. Select the unidirectional Association icon in the toolbar;
    3. Click an executor and drag it to the corresponding use case. Alternatively, click a use case and drag it to the executor.

     

     

    Example:

     

     

     


    ·

     

    2. Class Diagram

     

    The class diagram mainly describes how to create attributes and methods of a class.

     

     

    1. Create a basic class (including the class name)
    2. Right-click the created class and select new attribute to create the class attributes.
    3. Right-click the created class and select new operation to create the class method.

     

     

     

    Example:

     

    3. object graph:

     

    Similar to creating a class chart, one of the differences is that the object name must be underlined, and the Object Name representation method is composed of three

     

    A. General Method

    B. Only class names, colons and underscores are allowed.

    This indicates that the created model applies to all instances of this class. This representation is called an anonymous object.

     

    C. Only the Object Name and underline are allowed.

    Hidden attributes

     

    4. Status chart

     

    A. Creation status (States)

    1. Select the State icon in the toolbar;
    2. Click the location where the status is to be placed in the status chart;
    3. Name of the input status. (If an error occurs, use the RENAME command to change it)

     

    B. Create state transition)

    1. Select the state transitions icon in the toolbar;
    2. Click Start status and drag it to the next status;
    3. Enter the name of the Status transition. (If an error occurs, use the RENAME command to change it)

     

    C. Creation start status

    1. Select the start icon in the toolbar;
    2. In the status chart, click the position where the starting status is to be placed;
    3. Use the status conversion line for connection.

     

    D. End of creation

    1. Select the stop icon in the toolbar;
    2. In the status chart, click the location where you want to place the end state;

    Use the status conversion line for connection.

     

    Example:

     

    5. Sequence Diagram

     

    Create objects and information

    1. Double-click the sequence chart name to open the sequence chart;
    2. Drag the performer in the browser box use CaseView package into the graph;
    3. Select the "object" icon in the toolbar;
    4. Click the place where the object is placed in the graph and enter the corresponding name;
    5. Repeat steps 3-4;
    6. Select the "Object message" icon in the toolbar;
    7. From the information sender to the information recipient;
    8. Enter the name of the information;
    9. Repeat steps 6-8.

     

    Example:

     

    6. Collaboration Diagram

     

    Convert a sequence chart to a cooperative chart

     

    1. Double-click the sequence chart name to open the sequence chart;
    2. Select the menu browser -- create collaboration digoal at the top of the screen
    3. Adjust the objects and information in the graph to make it beautiful.

     


    Example:

     

    7. Component Diagram

     

    Create a main component diagram (Component digoal)

    1. Double-click the university package in the main component diagram to open the chart;
    2. Select the component icon in the toolbar;
    3. Click a position in the figure to place the component;
    4. Enter the component name.
 

8. Deployment Diagram

 

    1. Double-click the deployment diagram in the browser box );
    1. Select the processor icon in the toolbar and click a position in the figure;
    2. Enter the node name;
    3. Select the connection icon in the toolbar;
    4. Click a node and drag it to another node;
    5. Select the text icon in the toolbar;
    6. Write the text under the corresponding node.

     

    Is an example in the book:

    9. activity diagram


    1. Create activity)
    2. Demo-points)
    3. Create a synchronization bar)
    4. Create a start activity and terminate an activity

     

    Example: Activity diagram of the student's computer record Query

     

     

    The above is my understanding after I learned UML drawing, but after the acceptance, I am also the biggest problem, that is, adding spaces to people when naming, this will cause a lot of trouble when generating code, and the figure has not been corrected yet. Record my first gains and the second gains!

     

    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.