uml-state diagram, sequence diagram, activity diagram

Source: Internet
Author: User
Tags dashed line

One. Writing use case documentation

1. Contents of Use case: Use Case number case name performer Precondition Post conditionBasic PathExtended Path Field List business rulesNon-functional Requirements design constraintsPreconditions must be detected by the system and must be detected by the system before the use case begins. Basic Path Note points: 1. Don't have too many jargon2. Using the active Statement 3. Sentences are subject to system or performer4. Each sentence to the goal (such as: User input personal information, personal information see field List)5. Branching and looping (using extension paths) 6. Do not touch the interface details

Examine the use case model
Use Case tracking matrix
    use case 1 use case 2&nbs P; use case 3  use case 4 
  Requirements 1        
  Requirements 2        
  Requirements 3        
  Requirements 4        
              If a use case does not correspond to a requirement:  1. Implicit requirements                                                                   2. The customer does not expect the demand                If a requirement does not have a corresponding use case: 1. Non-functional requirements    2. Missing    two. Status diagrams               status graphs: 1. Possible states of a particular object                              2. Conversions between States                             3. Different behaviors in different states               has and has only one initial state. Solid origin               can have multiple termination states    solid outer ring             from one state to another: Transfer line one. Advanced Tips       Supplements for State diagrams: from one state to another state is calledTransfer (transition),The event on the transition corresponds to the state action. Transition can be labeled,event name [conditional]/action1. Composite state States have atomic state (atomic state) and decomposed state (composite status) 2. The synchronization bar can enter the next shape only if the upper two states are complete State 3. Walkthrough of an instanceA credit card system account has a status of use and freezes, in which the state of use includes both the normal state and the overdraft state. If the account balance is less than 0 to enter the overdraft status, overdraft status can be both deposits and withdrawals, but the overdraft amount can not exceed 5000 yuan, if the balance is greater than zero to enter the normal state, the normal state can be both deposits and withdrawals, if the continuous overdraft for 100 days, then into the frozen state, The frozen state can neither deposit nor withdraw money, must require the bank staff to thaw. Users can request to log out of an account in a state of use or in a frozen state. According to the above requirements, draw the state diagram of the account class.       Two.      Activity diagram Activity diagram is a program flowchart in UML that describes a way of event flow. Role: Describe the business process (most used) describes the use Case Path description method execution path (program flowchart) constituent elements: Start activity End Activity ACT Ivity (represented by rounded rectangles) Transition Conditionsynchronization bars (branching and merging),Swimlane (divides the object responsible for the activity)Decision (a diamond representation of the decision) can be used to design theobject (Rectangle)In the activity diagram, use dependency to connect it to the corresponding activity in the instance analysis:
Three. Sequence diagram       1. Overview: The sequence diagram is the third diagram in the UML diagram that uses frequency.   has two main functions: 1. Describes the path   2 of the use case. Describes the interaction between objects in your code (which can generate code)       2. constituent elements.           Lifeline (vertical dashed line)         The    object is represented as a rectangle, and the object name is underlined. The consumer uses the performer's symbol           activates the activation section to replace the lifeline, using a rectangular representation of the bar.           messages are communication between objects. In the sequence diagram used for implementation, the message is the method.                                                   in the order diagram for requirements, the message is a step.      3. Classification of messages              Call message:    activates an object           sends a message: The activity of other objects is not raised, just a step           return message (return msg):            Self message    create message     Destroy message    Synchronize message   Asynchronous message      4. Advanced sequence Diagram           Interactive fragment: A complex sequence diagram can be divided into several small pieces, called interactive fragments            types of interaction fragments: loop    loop      optional &nbsp:   selectable    equivalent to if                                       alternative     &NBSP:    replaceable     equivalent to  if   else5 Sequence diagram example analysis Draw a sequence diagram (business model) of a book Management system "borrowing" use case. Ø The librarian opens the borrowing interface, enters the borrowing information and submits the borrowing request; The system verifies the status of the library card, and if the library card does not borrow the library information and modifies the status of the book and the library card, and prompts the library to succeed;

uml-state diagram, sequence diagram, activity diagram

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.