slide 1 use case sequence diagram explained. slide 2 steps for building a sequence diagram 1)set the...
TRANSCRIPT
Slide 1
Use Case Sequence Diagram
Explained
Slide 2
Steps for Building a Sequence Diagram
1) Set the context
2) Identify which objects and actors will participate
3) Set the lifeline for each object/actor
4) Lay out the messages from the top to the bottom of the diagram based on the order in which they are sent
5) Add the focus of control for each object’s or actor’s lifeline
6) Validate the sequence diagram
Slide 3
Steps for Building a Sequence Diagram
To do these steps, the best tool is a Message Analysis Table.
As we progress thru the steps we will both show how to develop the Message Analysis Table and then show how the sequence diagram is constructed from that table.
Slide 4
1) Set the context.a) Select a use case.
b) Decide the initiating actor.
Steps for Building a Sequence Diagram
3 Register
MembershipCustomer
Slide 5
1) Set the context.a) Select a use case.
b) Decide the initiating actor.
Steps for Building a Sequence Diagram
Use Case Name RegisterAsMember
Use Case ID 3
Initiating Actor Customer
Message Analysis Table
Slide 6
2) Identify the objects that may participate in the implementation of this use case by completing the supplied message table.
a) List candidate objects.1) Use case controller class2) Domain classes 3) Database table classes4) Display screens or reports
Steps for Building a Sequence Diagram
Slide 7
2) Identify the objects
1) Use case controller class
Steps for Building a Sequence Diagram
RegisterAs Member Controller
Slide 8
2) Identify the objects
2) Domain Objects
Steps for Building a Sequence Diagram
RegisterAs Member Controller
Member
Slide 9
2) Identify the objects
3) Database Table Classes
Steps for Building a Sequence Diagram
RegisterAs Member Controller
MemberMember
Table
Slide 10
2) Identify the objects
4) Display Screens and/or Reports
Steps for Building a Sequence Diagram
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Slide 11
2) Identify the objects
Steps for Building a Sequence Diagram
Candidate Objects/Classes
Use Case Controller RegisterAsMemberController
Domain Database Table
Display Screens or Report Other UC
Member MemberTable MemberApplicationScreen
NewUserNamePasswordScreen
ConfirmationScreen
Slide 12
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)b) List candidate messages.
1) Examine each step in the normal scenario of the use case description to determine the messages needed to implement that step.
2) For each step:
1) Identify step number.
2) Determine messages needed to complete this step.
3) For each message, decide which class holds the data for this action or performs this action
3) Make sure that the messages within the table are in the same order as the normal scenario
Slide 13
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)b) List candidate messages.
1. Customer enters name, address, phone number, email address, credit card number, and expiration date of credit card.
2. System validates member information.
3. Customer enters new user name and password for subsequent membership login.
4. System validates user name and password.
5. Customer confirms membership information.
6. System emails membership confirmation to new member.
Slide 14
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)b) List candidate messages.
acceptMemberInformation()
1. Customer enters name, address, phone number, email address, credit card number, and expiration date of credit card.
Message
Slide 15
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)b) List candidate messages.
validateMembershipInformation ()
2. System validates member information..
Message
Slide 16
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)b) List candidate messages.
acceptUserNamePassword ()
3. Customer enters new user name and password for subsequent membership login..
Message
Slide 17
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)b) List candidate messages.
validateUserNamePassword ()
System validates user name and password.
Message
Slide 18
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)b) List candidate messages.
acceptConfirmation ()updateMembershipInformation ()
5. Customer confirms membership information..
Message
Slide 19
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)b) List candidate messages.
emailMembershipConfirmation
6. System emails membership confirmation to new member
Message
Slide 20
Steps for Building a Sequence Diagram
For each step:1) Identify step number.2) Determine messages needed to complete this step.3) For each message, decide which class holds the data for this action or performs this action
We have done the first two steps – now lest decide which class should RECEIVE this message and thus have a method to perform the functions of the message.
Slide 21
Steps for Building a Sequence Diagram
Step #
Message Name Owner Class Name
1 acceptMemberInformation MembershipApplicationScreen
2 validateMembershipInformation Member
3 acceptUserNamePassword NewUserNamePasswordScreen
4 validateUserNamePassword Member
5 acceptConfirmation ConfirmationScreen
5 updateMembershipInformation MemberTable
6 emailMembershipConfirmation Member
Slide 22
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)c) Begin sequence diagram construction.
1) Draw and label each of the identified actors and objects across the top of the sequence diagram.
2) The typical order from left to right across the top is the actor, primary display screen class, primary use case controller class, domain classes (in order of access), and other display screen classes (in order of access)
3) Set the lifeline for each object/actor
Slide 23
Steps for Building a Sequence Diagram c) Begin sequence diagram
construction.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
Slide 24
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
Slide 25
4) Lay out the messages from the top to the bottom of the diagram based on the order in which they are sent.
a) Working in sequential order of the message table, make a message arrow with the message name pointing to the owner class.
b) Decide which object or actor initiates the message and complete the arrow to its lifeline.
c) Add needed return messages.
d) Add needed parameters and control information.
Steps for Building a Sequence Diagram
Slide 26
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
acceptMemberInformationvalidateMembershipInformationacceptUserNamePasswordvalidateUserNamePasswordacceptConfirmationupdateMembershipInformationemailMembershipConfirmation
Slide 27
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
acceptMemberInformation
Slide 28
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
validateMembershipInformation (member information):valid
acceptMemberInformation
Slide 29
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
validateMembershipInformation (member information):valid
acceptMemberInformation
acceptUserNamePassword
Slide 30
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
validateMembershipInformation (member information):valid
acceptMemberInformation
acceptUserNamePassword
validateUserNamePassword (username, password):valid
Slide 31
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
validateMembershipInformation (member information):valid
acceptMemberInformation
acceptUserNamePassword
validateUserNamePassword (username, password):valid
acceptConfirmation:confirmed
Slide 32
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
validateMembershipInformation (member information):valid
acceptMemberInformation
acceptUserNamePassword
validateUserNamePassword (username, password):valid
acceptConfirmation:confirmed
Slide 33
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
validateMembershipInformation (member information):valid
acceptMemberInformation
acceptUserNamePassword
validateUserNamePassword (username, password):valid
acceptConfirmation:confirmed
updateMembershipInformation
Slide 34
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
validateMembershipInformation (member information):valid
acceptMemberInformation
acceptUserNamePassword
validateUserNamePassword (username, password):valid
acceptConfirmation:confirmed
updateMembershipInformation
memberhipsConfirmed()
Slide 35
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
validateMembershipInformation (member information):valid
acceptMemberInformation
acceptUserNamePassword
validateUserNamePassword (username, password):valid
acceptConfirmation:confirmed
updateMembershipInformation
memberhipsConfirmed()
emailMembershipConfirmation
Slide 36
5) Add the focus of control (activation box) for each object’s or actor’s lifeline.
6) Validate the sequence diagram.
Steps for Building a Sequence Diagram
Slide 37
Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor.
RegisterAs Member Controller
MemberMember
Table
MemberApplication
Screen
NewUserName
Password Screen
Confirm-ation
Screen
Customer
acceptConfirmation:confirmed
emailMembershipConfirmation
validateMembershipInformation (member information):valid
acceptMemberInformation
acceptUserNamePassword
memberhipsConfirmed()
validateUserNamePassword (username, password):valid
updateMembershipInformation