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)
- Right-click the use case View package in the browser box and a shortcut menu is displayed;
- Select the new -- Use Case item;
- Enter the name of the use case. (If an error occurs, use the RENAME command to change the name)
- If the document window is invisible, select the view-documentation menu at the top of the screen;
- Select the required use case in the browser box;
- 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.
- Use case diagram: Use Case digoal
- Class diagram: Class digoal
- Object graph: Object digoal
- Status chart: State Divisor
- Sequence diagram: sequence digoal
- Collaboration diagram: Collaboration digoal
- Component diagram: component digoal
- Deployment diagram: Deployment digoal
- 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
- Double-click the main entry in the use case View package in the browser box to open the main use case diagram;
- Click the performer in the browser box and drag it to the main use case chart;
- Repeat Step 2nd until the required work is completed;
- Click the use case in the browser box and drag it to the main use case diagram;
- Repeat Step 4th until the required work is completed;
- Select the unidirectional Association icon in the toolbar;
- 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)
- Select the State icon in the toolbar;
- Click the location where the status is to be placed in the status chart;
- Name of the input status. (If an error occurs, use the RENAME command to change it)
B. Create state transition)
- Select the state transitions icon in the toolbar;
- Click Start status and drag it to the next status;
- Enter the name of the Status transition. (If an error occurs, use the RENAME command to change it)
C. Creation start status
- Select the start icon in the toolbar;
- In the status chart, click the position where the starting status is to be placed;
- Use the status conversion line for connection.
D. End of creation
- Select the stop icon in the toolbar;
- 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
- Double-click the sequence chart name to open the sequence chart;
- Drag the performer in the browser box use CaseView package into the graph;
- Select the "object" icon in the toolbar;
- Click the place where the object is placed in the graph and enter the corresponding name;
- Repeat steps 3-4;
- Select the "Object message" icon in the toolbar;
- From the information sender to the information recipient;
- Enter the name of the information;
- Repeat steps 6-8.
Example:
6. Collaboration Diagram
Convert a sequence chart to a cooperative chart
- Double-click the sequence chart name to open the sequence chart;
- Select the menu browser -- create collaboration digoal at the top of the screen
- Adjust the objects and information in the graph to make it beautiful.
Example:
7. Component Diagram
Create a main component diagram (Component digoal)
- Double-click the university package in the main component diagram to open the chart;
- Select the component icon in the toolbar;
- Click a position in the figure to place the component;
- Enter the component name.