Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Slide 1 Use Case Sequence Diagram Explained

2 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

3 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.

4 Slide 4 1)Set the context. a)Select a use case. b)Decide the initiating actor. Steps for Building a Sequence Diagram 3 Register Membership Customer

5 Slide 5 1)Set the context. a)Select a use case. b)Decide the initiating actor. Steps for Building a Sequence Diagram Use Case NameRegisterAsMember Use Case ID3 Initiating ActorCustomer Message Analysis Table

6 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 class 2)Domain classes 3)Database table classes 4)Display screens or reports Steps for Building a Sequence Diagram

7 Slide 7 2)Identify the objects 1)Use case controller class Steps for Building a Sequence Diagram RegisterAs Member Controller

8 Slide 8 2)Identify the objects 2)Domain Objects Steps for Building a Sequence Diagram RegisterAs Member Controller Member

9 Slide 9 2)Identify the objects 3)Database Table Classes Steps for Building a Sequence Diagram RegisterAs Member Controller Member Table

10 Slide 10 2)Identify the objects 4)Display Screens and/or Reports Steps for Building a Sequence Diagram RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen

11 Slide 11 2)Identify the objects Steps for Building a Sequence Diagram Candidate Objects/Classes Use Case ControllerRegisterAsMemberController DomainDatabase Table Display Screens or Report Other UC MemberMemberTableMemberApplicationScreen NewUserNamePasswordScreen ConfirmationScreen

12 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

13 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.

14 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

15 Slide 15 Steps for Building a Sequence Diagram 2)Identify the objects (cont.) b)List candidate messages. validateMembershipInformation () 2. System validates member information.. Message

16 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

17 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

18 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

19 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

20 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.

21 Slide 21 Steps for Building a Sequence Diagram Step # Message NameOwner Class Name 1acceptMemberInformationMembershipApplicationScreen 2validateMembershipInformationMember 3acceptUserNamePasswordNewUserNamePasswordScreen 4validateUserNamePasswordMember 5acceptConfirmationConfirmationScreen 5updateMembershipInformationMemberTable 6emailMembershipConfirmationMember

22 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

23 Slide 23 Steps for Building a Sequence Diagram c)Begin sequence diagram construction. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer

24 Slide 24 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer

25 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

26 Slide 26 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer acceptMemberInformation validateMembershipInformation acceptUserNamePassword validateUserNamePassword acceptConfirmation updateMembershipInformation emailMembershipConfirmation

27 Slide 27 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer acceptMemberInformation

28 Slide 28 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer validateMembershipInformation (member information):valid acceptMemberInformation

29 Slide 29 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer validateMembershipInformation (member information):valid acceptMemberInformation acceptUserNamePassword

30 Slide 30 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer validateMembershipInformation (member information):valid acceptMemberInformation acceptUserNamePassword validateUserNamePassword (username, password):valid

31 Slide 31 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer validateMembershipInformation (member information):valid acceptMemberInformation acceptUserNamePassword validateUserNamePassword (username, password):valid acceptConfirmation:confirmed

32 Slide 32 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer validateMembershipInformation (member information):valid acceptMemberInformation acceptUserNamePassword validateUserNamePassword (username, password):valid acceptConfirmation:confirmed

33 Slide 33 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer validateMembershipInformation (member information):valid acceptMemberInformation acceptUserNamePassword validateUserNamePassword (username, password):valid acceptConfirmation:confirmed updateMembershipInformation

34 Slide 34 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer validateMembershipInformation (member information):valid acceptMemberInformation acceptUserNamePassword validateUserNamePassword (username, password):valid acceptConfirmation:confirmed updateMembershipInformation memberhipsConfirmed()

35 Slide 35 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer validateMembershipInformation (member information):valid acceptMemberInformation acceptUserNamePassword validateUserNamePassword (username, password):valid acceptConfirmation:confirmed updateMembershipInformation memberhipsConfirmed() emailMembershipConfirmation

36 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

37 Slide 37 Steps for Building a Sequence Diagram c. Set the lifeline for each object/actor. RegisterAs Member Controller Member Table Member Application Screen NewUser Name Password Screen Confirm- ation Screen Customer acceptConfirmation:confirmed emailMembershipConfirmation validateMembershipInformation (member information):valid acceptMemberInformation acceptUserNamePassword memberhipsConfirmed() validateUserNamePassword (username, password):valid updateMembershipInformation


Download ppt "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."

Similar presentations


Ads by Google