Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
357 views

Sequence Diagram

The document provides an overview of various Unified Modeling Language (UML) diagrams used in software design, including system sequence diagrams, class diagrams, use case diagrams, and communication diagrams. It discusses how to construct these diagrams, including identifying actors, messages, classes, and relationships between components. Guidelines are provided for drawing each type of diagram to effectively model interactions, behaviors, and the structure of a software system.

Uploaded by

Shehroz Ali
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
357 views

Sequence Diagram

The document provides an overview of various Unified Modeling Language (UML) diagrams used in software design, including system sequence diagrams, class diagrams, use case diagrams, and communication diagrams. It discusses how to construct these diagrams, including identifying actors, messages, classes, and relationships between components. Guidelines are provided for drawing each type of diagram to effectively model interactions, behaviors, and the structure of a software system.

Uploaded by

Shehroz Ali
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 22

18-1

Partial Design Class Diagram

18-2

Drawing System Sequence Diagrams


System sequence diagram - a diagram that depicts the interaction between an actor and the system for a use case scenario.

helps identify high-level messages that enter and exit the system

10-3

Design Use Case

18-4

Design Use Case (continued)

18-5

Design Use Case (continued)

18-6

Design Use Case (concluded)

18-7

System Sequence Diagram Notations


1. 2.

3.

4.

Actor - the initiating actor of the use case is shown with the use case actor symbol. System the box indicates the system as a "black box" or as a whole. Lifelines the dashed vertical lines extending downward from the actor and system symbols, which indicate the life of the sequence. Activation bars the bars set over the lifelines indicate period of time when participant is active in the interaction.

10-8

System Sequence Diagram Notations (cont.)


5.

6. 7.

Input messages - In parentheses include parameters, following same naming convention and separated with commas. Output messages return messages. Frame These can show loops, alternate fragments, or optional steps.

10-9

Guidelines for Constructing System Sequence Diagrams

Identify which scenario of use case you will depict. So more important to clearly communicate a single scenario. Draw a rectangle representing the system as a whole and extend a lifeline under it. Identify each actor who directly provides an input to the system or directly receives an output from the system. Extend lifelines under the actor(s). Examine use case narrative to identify system inputs and outputs. Draw each external message as a horizontal arrow from the actor's lifeline to the system or from the system to the actor. Label inputs according to UML convention. Add frames to indicate optional messages with conditions. Frames can also indicate loops and alternate fragments. Confirm that the messages are shown in the proper sequence from top to bottom.
10-10

Types of Design Classes


Entity Class - contains business related information

Interface Class - provides the means by which an actor interacts with the system.

A window, dialogue box, or screen. For nonhuman actors, an application program interface (API).

Control Class - contains application logic. Persistence Class - provides functionality to read and write to a database. Structuring the system this way makes the maintenance and enhancement of those classes simpler and easier
18-11

Modeling Class Interactions, Behaviors, and States

Step 1: Identify and Classify Use-Case Design Classes

Step 2: Identify Class Attributes


Step 3: Identify Class Behaviors and Responsibilities

Step 4: Model Object States


Step 5: Model Detailed Object Interactions

18-12

Step 1: Identify and Classify Use-Case Design Classes


Interface, Control, and Entity Classes of Place New Order Use Case
Interface Classes
W00-Member Home Page W02-Member Profile Display W03-Display Order Summary W04-Display Order Confirmation W09-Member Account Status Display W11-Catalog Display W15-Product Detail Display

Controller Classes Place New Order Handler

18-13

Entity Classes Billing Address Shipping Address Email Address Active Member Member Order Member Ordered Product Product Title Audio Title Game Title Video Title Transaction

Step 3: Identify Class Behaviors and Responsibilities

Analyze use cases to identify required system behaviors

Search for verb phrases Some will reflect manual actions, others automated

Associate behaviors and responsibilities with classes Model classes that have complex behavior Examine class diagram for additional behaviors Verify classifications

18-14

Tools for Identifying Behaviors and Responsibilities


Sequence diagram - a UML diagram that models the logic of a use case by depicting the interaction of messages between objects in time sequence.

18-15

CRC Card Listing Behaviors and Collaborators of a Class


Object Name: Member Order

Sub Object:
Super Object: Transaction Behaviors and Responsibilities Report order information Calculate subtotal cost Calculate total order cost Update order status Create Ordered Product Delete Ordered Product
18-16

Collaborators Member Ordered Product

Sequence Diagram

1. 2. 3. 4. 5.

Actor Interface class Controller class Entity classes Messages

6. 7. 8. 9.

Activation bars Return messages Self-call Frame

18-17

Another Sequence Diagram

18-18

Guidelines for Constructing Sequence Diagrams


18-19

Identify the scope of the sequence diagram, whether entire use-case scenario or one step. Draw actor and interface class if scope includes that. List use-case steps down the left-hand side. Draw boxes for controller class and each entity class that must collaborate in the sequence Add persistence if scope includes that. Draw messages and point each to class that will fulfill the responsibility. Add activation bars to indicate object instance lifetimes. Add return messages as needed for clarity. Add frames for loops, optional steps, alternate steps, etc.

Additional UML Design and Implementation Diagrams


Communication diagram - models the interaction of objects via messages, focusing on the structural organization of objects in a network format.

Also known as collaboration diagram

18-20

Communication Diagram

1.
2. 3. 4.

Class Messages Self-calls Numbering scheme - messages should be numbered with a nested scheme.
18-21

What is different?

A communication diagram is similar to a sequence diagram. But while a sequence diagram focuses on the timing or sequence of messages, a communication diagram focuses on the structural organization of objects in a network format. Sequence diagrams are generally better when you want to emphasize the sequence of calls. Communication diagrams are better when you want to emphasize the links. And they are easier when brainstorming alternative solutions.
18-22

You might also like