Use case in UML (USE Case) concept analysis and instance
Text / Dengfeng
2005-02-25
UML seems to be the simplest, the most important function of modeling the model is to express the functional needs or behavior of the system, and use the example model modeling according to my understanding of the example. With an example, the participant (Actor), the use case, the system boundary, the arrow, and is done with the method of the drawing. Example Description Use to detail each use case in the example map, complete with text documents, and various relationships composed of arrows, including generalization, including, expansion, etc. This article is prepared to introduce you to the following, all illustrated with PowerDesigner.
u
u Participants
U generalization
u << USE >>
u << incrude >>
u << EXTEND >>
u use example description
1. Uses (use case)
Figure 1
It is a description of a set of action sequences (which includes variants), and the system executes the action to perform this action to generate a observable result value. For example, you can use the calculator, here you can view the calculator as a case, the participant is Dengfeng, Deng Peak Press 3 3 (Sequence Executed by the Condition), and the computer returns a result 6.
2. Participants (Actor)
Participants are not a special representation, referring to the system, using the system or the role played in interaction with the system. Therefore, participants can be people, can be things, or time or other systems, etc.. It is also important to note that participants do not refer to people or things itself, but represent the roles of people or things play at the time. For example, Xiaoming is a library administrator, and he participated in the interaction of the library management system. At this time, he can act as an administrator's role. It can also borrow books to the library as a boring person, and play two The role is two different participants. Participants are drawn in the drawing of characters, and the names of the participants are attached to the character.
3. Generalization
The generalization concept in the generalization and classes is the same, the child use inherits the behavior and meaning of the parental condition, and can also increase or cover the behavior of the parent! The sub-condition can appear in any parent! The parent and the child have a specific example). Here are two icons to illustrate the concept and meaning of the generalization.
Figure 2 Meaning inheritance Figure 3 behavior inheritance
4. << User >>
<< Use >>: Its relationship is very like a function call or a child process in this way, called pumping
Icon use case because it cannot be used alone and must be used by other use cases, please see the picture below
Figure 4 Example of using << USE >>
5. << Include >>
How to explain this definition? Also explain its function, << include >> can separate the common steps of several use cases into a separate included case. Friends who have learned C know its meaning. Ha ha
Ok, definition already knows, use an example to deepen everyone's impression. If there is a person system, the manager can view the information of the employee and increase, modify, and delete, but each time you perform these three operations, you must position the corresponding employees, you first query the employee to be operated. Figure 5 shows the use of the use case diagram of the expression, please understand the meaning of the << include >>
6. << Extend >>
<< Extend >> provides a method for the addition of a new behavior that has been added. The basic use case provides a set of extended points (Extend Points), the extension is hook, where new behavior can be added, and the extension provides a set of insertions that can be inserted into the hook position of the base case. It should be noted that the basic use case does not know any details of the extension case, which only provides hooks for the extension case. This is different from << Include >>, and if it is not included in this case, the customer use will be incomplete. Figure 6 illustrates the main text description
Figure 6 << Extend>
7. Use example
Of course, the use of examples is a textual description of the use case. What items are to be described, there is not much to say this here, give you a specific example look at it. If there is a family teacher, just a abstract fragment below. It is mainly to explain the meaning of the examples described.
Below is the use case description of the use case website announcement
Usage Name: Website Notice Release Digand Signer Number: 202 Participants: The person in charge provides a brief description: the person in charge is used to fill in and modify the announcement of the homepage of the home education website, the announcement finally appears on the homepage of the family-taught website. Front conditions: The person in charge has visited the basic event stream of the website management system: 1. The person in charge mouse click on the "Modify Announcement" button 2. A text box appears, showing the original announcement content 3. The person in charge can modify the announcement on the text box, or it can be completely deleted, rewrote the new announcement 4. The person in charge edited the text box, press the "Submit" button, the home page announcement is modified 5. Use case termination A1: Before pressing the "Submit" button, the person in charge can press the "Back" button, and any modified content of the text box will not affect the website home page Announcement abnormal event stream: 1. Tip error message, the person in charge confirms 2. Return to the management system home page Back condition: The announcement information of the homepage is modified: no
Ok, the use case section will introduce this, which is mainly used in the modeling of the entire system abstract description. It is a description of the functional layer. Going to work, huh, huh