Software Design

Table of Contents

Sequence Diagrams

Introduction

it’s a way to model interactions between objects

interaction specifies how messages and data are exchanged between objects

interaction partners: human (lecturer, admin) or non-human (server, printer, software)

interactions: conversation between people, message exchange between human and software, communication protocols, sequence of method calls in program, etc.

Basics

Interactions, interaction partners

a sequence diagram is 2D:

interaction: sequence of event specifications

Sequence diagram example

interaction partners are lifelines:

Messages

message is defined via send and receive events

execution specification (optional):

Exchanging messages example on diagram

rules:

Exchanging messages rules

synchronous message:

asynchronous message:

response message:

object creation:

object destruction:

found message:

lost message:

Time-consuming message:

Combined fragments

model various control structures, have 12 predefined operators.

Example:

Combined fragment example

Branches & loops

alt:

Alt fragment

opt:

Opt fragment

loop:

Loop fragment

break:

Break fragment

Concurrency and order

seq:

Seq fragment

strict:

Strict fragment

par:

Par fragment

critical:

Critical fragment

Filters and assertions

ignore:

Ignore fragment

consider:

Consider fragment

assert:

Assert fragment

neg:

Neg fragment

Further language elements

time constraints:

Interaction reference:

Gate:

state invariant:

State invariant diagram