Title: UML Sequence Diagrams Use Case Diagrams
1UML Sequence Diagrams Use Case Diagrams
2Agenda
- Sequence Diagram Example
- Use Case Principles
- Use Case Notation
- Use Case Elaboration
- Lab 4 Use Case Example
3Using Rational Rose
Baird Sun Cluster From csh source
/usr/local/rational/rs_setup.csh rose
May also use dia, argo, objecteering
4Model and View Diagrams
Implementation View
Class Diagram Object Diagram
Component Diagrams
Structural View
User View Use Case Diagrams
Deployment Diagram
Sequence Diagram Collaboration Diagram Statechart
Diagram Activity Diagram
Behavioral View
Environment View
5Sequence Diagram (Basic)
Swimlane
Object Class or Actor
name
Focus of Control/ Activation
message
Object Destruction/ Termination
X
ltltcreategtgt ltltdestroygtgt
6Sequence Diagram (Basic) Example
aClass Class
Register
adjustRoom
checkRooms
7Sequence Diagram (Hints)
- Can show either objects or processes
(ltltprocessgtgt) in swimlanes - Use multiple diagrams to show variations
- Use advanced features sparingly to keep diagram
understandable
8Lab 4 Exercise
9Use Case Principles
- Describes required functionality in terms of the
user system - Identifies external actors
- Identifies system boundary
- Describes scenarios of use
- Describes pre/post conditions
- Describes variants/exceptions
10Use Case Notation (Basic)
System Boundary (often implied)
Use Case
Participates-In Association
11Use Case (Basic) Example
Credit Card System
Perform Card Transaction
Process Customer Bill
Manage Account
12Remember
- Use Case description in format verb direct
object - Use Cases are in multiple levels
- Context Level shows most general
- Limit context level use cases to what you would
put on functionality slide
13Use Cases (Advanced)
Base Use Case
Base Use Case
ltltextendgtgt
Extending Use Case
Common Use Case
Base Use Case
ltltincludegtgt
Included Use Case
14Use Case (Advanced) Example
15Use Case Descriptions
- Sequence of Activities
- Place Order
- 1. Validate User (included)
- 2. Collect users order items
- 3. Set Delivery priority (extend)
- 4. Submit order for processing
16Use Case Descriptions
Preconditions True
Postconditions If customer fails validation
customer exits system If customer
passes validation customer order
processed
17Use Case Descriptions
- User fails validation
- User cancels order
- User orders invalid item
- User requests invalid quantity
- User order exceeds available credit
18Use Case Hints
- Use language of user
- Avoid implementation
- Get good scenarios
- Names single, identifiable and reasonably atomic
behavior - Describes flow of events clearly enough so
outsider can follow
19Use Case Hints
- Factors common behavior by pulling it from other
use cases that it includes - Factors variants by pushes such behavior into
other use cases that extend it. - Show only use cases that are important to
understand system - Show only actors that relate to use cases
20Use Case Hints
- Specify actor names by specific roles
- Use top level diagram to show context
- Decompose top-level use cases to show
requirements - Group common use cases into packages
21Class Exercise Lab 4 Use Cases