Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

The Sequence diagram part 1

Pemodelan Data
Rizka Wakhidatus Sholikah
Outline

• Combined fragments
• Creating a sequence diagram

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Combined fragments

• Combined fragments operators use to model


various control structures explicitly
• There are three types of operators:
• Branches and loops
• Concurrency and order
• Filters and assertions

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Combined fragments cont.

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Branches and loops - alt

• Alt fragment represent alternative sequences


• An alt operator has at least two operands
• Each represent an alternative path in the execution
• Represent multiple cases in programming
• Ex: switch statement
• Each operand has a guard  Boolean expression
enclose within square brackets
• If there is no guard, the default value is [true]

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Branches and loops - alt
• [else] is special guard
that can be used when
there is no condition
fulffiled

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Branches and loops - opt

• This operator specified


as an if statement
without an else
branch

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Branches and loops - loop

• loop is used to express the sequence that


executed repeatedly
• The keyword loop is followed by an optional
specification of the number of iterations
• The syntax of specification (min .. max) or
(min,max)
• min  minimum number of iteration
• max  maximum number of iteration
• If there is no specification of iteration, the default
valued is *
INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia
www.its.ac.id
Branches and loops - break

• break consist of single operand plus a guard


• If the guard is true the interaction within this
operand are executed
• break also can be used as a simple exception
handling

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Branches and loops - break

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Concurrency and order-seq

• The seq fragment represents the default order


• The seq has at least one operand
• We can use seq fragment to group a message
together with a break fragment
• seq is default order so that usually does not
need to be modeled explicitly

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Concurrency and order-seq

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Concurrency and order - strict

• The strict fragment refers to a sequential


interaction with strict order
• If there is no message exchange between the
interaction partners, messages in operand
that is higher up on the vertical axis are
always exchange first

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Concurrency and order-strict

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Filters and assertions

• ignore fragment indicates irrelevant messages


• Irrelevant messages can occur at runtime but have no
further significance for the functions depicted in the
model
• consider fragment specifies the messages that
important for the interaction
• The messages shown in set of notation after keywords
• All messages that occur in consider fragment but not
specify in the set of relevant messages are classified as
irrelevant
INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia
www.its.ac.id
Filters and assertions

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Filters and assertions

• assert fragment use to identify


certain model trace as mandatory
• neg fragment the model an invalid
interaction
• Describe situation that must not occur
• Explicit highlight frequently error

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Creating sequence diagram from class diagram

INSTITUT TEKNOLOGI SEPULUH NOPEMBER, Surabaya - Indonesia


www.its.ac.id
Thank you

You might also like