Download presentation
Presentation is loading. Please wait.
Published byGeorgia Paul Modified over 6 years ago
1
COMP 2710 Software Construction Sequence Diagrams (cont.)
Dr. Xiao Qin Auburn University
2
Review: Sequence Diagram
3
Steps for Building a Sequence Diagram
Set the context Identify which objects and actors will participate Set the lifeline for each object/actor Lay out the messages from the top to the bottom of the diagram based on the order in which they are sent Add the focus of control for each object’s or actor’s lifeline Validate the sequence diagram Steps for building a sequence diagram 1) Set the context Determine the context of the sequence diagram Context of the diagram can be a system, a use case, a scenario of a use case, or an operation of a class MOST COMMONLY, one use-case scenario 2) Identify which objects/actors will participate Review the use case scenario and identify objects/actors Objects are also found in the class diagrams May uncover new classes/objects during this process 3) Set the lifeline Draw vertical below each actor/object to represent its existence during the sequence Place an X below an object at the point on the lifeline where the object goes out of existence 4) Lay out messages Draw arrows to represent the messages being passed from object to object, with the arrow pointing in the message’s transmission direction Review the use case scenario and look for communication between objects and actors OR objects and other objects Identify senders and receivers of messages Arrows should be placed in order from the first message (at the top) to the last (at the bottom) to show time sequence Put name of operation to be invoked on top of arrow line (add arguments if known) 5) Add focus of control Draw a narrow rectangular box over the top of the lifelines to represent when the actors or classes are sending and receiving messages 6) Validate Guarantee that the diagram depicts all of the steps in the process
4
Steps for Building a Sequence Diagram
Set the context. Select a use case. Decide the initiating actor. Steps for building a sequence diagram 1) Set the context Determine the context of the sequence diagram Context of the diagram can be a system, a use case, a scenario of a use case, or an operation of a class MOST COMMONLY, one use-case scenario 2) Identify which objects/actors will participate Review the use case scenario and identify objects/actors Objects are also found in the class diagrams May uncover new classes/objects during this process 3) Set the lifeline Draw vertical below each actor/object to represent its existence during the sequence Place an X below an object at the point on the lifeline where the object goes out of existence 4) Lay out messages Draw arrows to represent the messages being passed from object to object, with the arrow pointing in the message’s transmission direction Review the use case scenario and look for communication between objects and actors OR objects and other objects Identify senders and receivers of messages Arrows should be placed in order from the first message (at the top) to the last (at the bottom) to show time sequence Put name of operation to be invoked on top of arrow line (add arguments if known) 5) Add focus of control Draw a narrow rectangular box over the top of the lifelines to represent when the actors or classes are sending and receiving messages 6) Validate Guarantee that the diagram depicts all of the steps in the process
5
Steps for Building a Sequence Diagram
Identify the objects that may participate in the implementation of this use case by completing the supplied message table. a) List candidate objects. Use case controller class Domain classes Database table classes Display screens or reports Steps for building a sequence diagram 1) Set the context Determine the context of the sequence diagram Context of the diagram can be a system, a use case, a scenario of a use case, or an operation of a class MOST COMMONLY, one use-case scenario 2) Identify which objects/actors will participate Review the use case scenario and identify objects/actors Objects are also found in the class diagrams May uncover new classes/objects during this process 3) Set the lifeline Draw vertical below each actor/object to represent its existence during the sequence Place an X below an object at the point on the lifeline where the object goes out of existence 4) Lay out messages Draw arrows to represent the messages being passed from object to object, with the arrow pointing in the message’s transmission direction Review the use case scenario and look for communication between objects and actors OR objects and other objects Identify senders and receivers of messages Arrows should be placed in order from the first message (at the top) to the last (at the bottom) to show time sequence Put name of operation to be invoked on top of arrow line (add arguments if known) 5) Add focus of control Draw a narrow rectangular box over the top of the lifelines to represent when the actors or classes are sending and receiving messages 6) Validate Guarantee that the diagram depicts all of the steps in the process
6
Steps for Building a Sequence Diagram
Identify the objects (cont.) b) List candidate messages. (in message analysis table) Examine each step in the normal scenario of the use case description to determine the messages needed to implement that step. For each step: Identify step number. Determine messages needed to complete this step. For each message, decide which class holds the data for this action or performs this action Make sure that the messages within the table are in the same order as the normal scenario Steps for building a sequence diagram 1) Set the context Determine the context of the sequence diagram Context of the diagram can be a system, a use case, a scenario of a use case, or an operation of a class MOST COMMONLY, one use-case scenario 2) Identify which objects/actors will participate Review the use case scenario and identify objects/actors Objects are also found in the class diagrams May uncover new classes/objects during this process 3) Set the lifeline Draw vertical below each actor/object to represent its existence during the sequence Place an X below an object at the point on the lifeline where the object goes out of existence 4) Lay out messages Draw arrows to represent the messages being passed from object to object, with the arrow pointing in the message’s transmission direction Review the use case scenario and look for communication between objects and actors OR objects and other objects Identify senders and receivers of messages Arrows should be placed in order from the first message (at the top) to the last (at the bottom) to show time sequence Put name of operation to be invoked on top of arrow line (add arguments if known) 5) Add focus of control Draw a narrow rectangular box over the top of the lifelines to represent when the actors or classes are sending and receiving messages 6) Validate Guarantee that the diagram depicts all of the steps in the process
7
Steps for Building a Sequence Diagram
Identify the objects (cont.) c) Begin sequence diagram construction. Draw and label each of the identified actors and objects across the top of the sequence diagram. 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) Set the lifeline for each object/actor Steps for building a sequence diagram 1) Set the context Determine the context of the sequence diagram Context of the diagram can be a system, a use case, a scenario of a use case, or an operation of a class MOST COMMONLY, one use-case scenario 2) Identify which objects/actors will participate Review the use case scenario and identify objects/actors Objects are also found in the class diagrams May uncover new classes/objects during this process 3) Set the lifeline Draw vertical below each actor/object to represent its existence during the sequence Place an X below an object at the point on the lifeline where the object goes out of existence 4) Lay out messages Draw arrows to represent the messages being passed from object to object, with the arrow pointing in the message’s transmission direction Review the use case scenario and look for communication between objects and actors OR objects and other objects Identify senders and receivers of messages Arrows should be placed in order from the first message (at the top) to the last (at the bottom) to show time sequence Put name of operation to be invoked on top of arrow line (add arguments if known) 5) Add focus of control Draw a narrow rectangular box over the top of the lifelines to represent when the actors or classes are sending and receiving messages 6) Validate Guarantee that the diagram depicts all of the steps in the process
8
Steps for Building a Sequence Diagram
4) Lay out the messages from the top to the bottom of the diagram based on the order in which they are sent. Working in sequential order of the message table, make a message arrow with the message name pointing to the owner class. Decide which object or actor initiates the message and complete the arrow to its lifeline. Add needed return messages. Add needed parameters and control information. Steps for building a sequence diagram 1) Set the context Determine the context of the sequence diagram Context of the diagram can be a system, a use case, a scenario of a use case, or an operation of a class MOST COMMONLY, one use-case scenario 2) Identify which objects/actors will participate Review the use case scenario and identify objects/actors Objects are also found in the class diagrams May uncover new classes/objects during this process 3) Set the lifeline Draw vertical below each actor/object to represent its existence during the sequence Place an X below an object at the point on the lifeline where the object goes out of existence 4) Lay out messages Draw arrows to represent the messages being passed from object to object, with the arrow pointing in the message’s transmission direction Review the use case scenario and look for communication between objects and actors OR objects and other objects Identify senders and receivers of messages Arrows should be placed in order from the first message (at the top) to the last (at the bottom) to show time sequence Put name of operation to be invoked on top of arrow line (add arguments if known) 5) Add focus of control Draw a narrow rectangular box over the top of the lifelines to represent when the actors or classes are sending and receiving messages 6) Validate Guarantee that the diagram depicts all of the steps in the process
9
Steps for Building a Sequence Diagram
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 1) Set the context Determine the context of the sequence diagram Context of the diagram can be a system, a use case, a scenario of a use case, or an operation of a class MOST COMMONLY, one use-case scenario 2) Identify which objects/actors will participate Review the use case scenario and identify objects/actors Objects are also found in the class diagrams May uncover new classes/objects during this process 3) Set the lifeline Draw vertical below each actor/object to represent its existence during the sequence Place an X below an object at the point on the lifeline where the object goes out of existence 4) Lay out messages Draw arrows to represent the messages being passed from object to object, with the arrow pointing in the message’s transmission direction Review the use case scenario and look for communication between objects and actors OR objects and other objects Identify senders and receivers of messages Arrows should be placed in order from the first message (at the top) to the last (at the bottom) to show time sequence Put name of operation to be invoked on top of arrow line (add arguments if known) 5) Add focus of control Draw a narrow rectangular box over the top of the lifelines to represent when the actors or classes are sending and receiving messages 6) Validate Guarantee that the diagram depicts all of the steps in the process
10
Sequence Diagrams
11
Sequence Diagram
12
Sequence Diagram Sequence Diagram for Compilation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.