2. Open the downloaded vpp file in Visual Paradigm. You can open this project through Project > Open.
3. Open the registered class diagram, and by viewing the contents of the diagram, we know that there are three classes here-registration UI, registration controller and user.
4. Now we want to model the interaction between object instances of these classes at runtime. Because the controller class is responsible for controlling the registration process, its subsequence diagram is added. Move the mouse pointer to the RegistrationController, click the resource icon in the lower right corner and select New Diagram ... from the pop-up menu.
5. In the New Diagram window, select Sequence Diagram, and then click Next. Leave the default icon name unchanged, and then click OK to confirm.
6. After creating an empty UML sequence diagram, select the boundary lifeline (B) from the diagram toolbar.
7. Click on the chart to create the dividing line of the lifeline.
8. Enter the registrationUI as the lifeline name, and then press Enter to confirm.
9. right-click the lifeline and select choose class > from the pop-up menu. Select a category ...
10. In the Select Class window, select the RegistrationUI class, and then click OK to confirm.
Then draw the lifeline is:
1 1. Create a control lifeline: registered controller: registered controller and an entity lifeline): user: user. Don't forget to choose suitable courses for them. Draw the chart as shown in the figure below:
12. Let's model the methods called between lifelines and move the mouse pointer to the lifeline registration UI.
13. Press and hold the resource resource directory and drag.
14. Move to Lifeline registrationController and release the mouse button.
15. Select a message from the resource directory.
16. This will pop up a list name of new sequence information for you to choose. You can see that these options are the operations of classRegistrationController, and select createUser(name, password) among them.
17. By associating lifeline registrationController with user, we can see that registrationController has created a user lifeline. Therefore, we need to create a message to associate the two. Move the mouse pointer to activate the Lifeline Registration Controller.
18. Press and drag the resource directory.
19. Release the mouse pointer at the Lifeline user.
20. Select Create Message from the resource directory.
This creates the information, and the generated image is shown in the following figure:
2 1. Create information setName and setPassword from lifeline registrationController to users. So far, the chart is shown in the following figure:
22. You can also specify the operation parameters, taking the information createUser(name, password) as an example. Right-click it and select Open Specification ... from the drop-down menu.
23. Edit the behavior attribute by clicking the ellipsis on the button and jump to the operation type.
24. in the call operation specification window, click add > text ... to add parameters. In this example, click add > text ... to add the parameter peter. Click add > again. Text ... Add parameter mypwd. Note that the two parameters here refer to the two parameters given by operations. If you add a third parameter, it will be automatically ignored (because only two operations are defined).
25. Click OK to close the window and return to the chart. The added parameters are displayed on the chart.