Week 3 Flashcards
What do interaction diagrams do? What four things do they show?
describe how objects interact to realise use case scenarios
- interactions of a system with its environment
- interaction between system parts in order to show how a specific use case can be implemented
- interprocess communication
- communication at class level
What does an interaction do?
specifies how messages and data are exchanged between interaction partners
What are some examples of interactions?
can be conversations between people, message exchange between humans and a software system, communication protocols, sequences of method calls in a program, etc
Four Types of Interaction Diagrams
- Sequence Diagram - chronological order on the vertical axis and interaction partners on horizontal axis
- Communication Diagram - focuses on who communicates with whom, does not have a separate time dimension, message order via decimal classification
- Timing Diagram - shows state changes of interaction partners that result from occurence of events; chronological order on horizontal axis and interaction partners with their states on vertical
- Interaction Overview Diagram:
- allows to place various interaction diagrams in a logical order
- basic notation concepts of activity diagram
What are interaction partners? How are they represented in sequence diagrams?
The entities interacting with one another in a system.
depicted as rectangles at the top of the horizontal dashed lines (at the head of the “lifelines”)
the rectangle contains the expression roleName:Class
What are roles for interaction partners?
a more general concept than objects, as an object can take on different roles over its lifetime
How is object creation represented?
represented by a dashed arrow where the arrowhead points to the head of the lifeline of the object to be created
the dashed arrow contains the keyword new
How is object destruction represented?
a large cross at the end of a lifeline
How does message exchange take place in a sequence diagram?
- message is sent via a send event andreceived via a receive event
- execution specification is a continuous bar used to visualise when an interaction partner executes some behaviour
If if you have two messages a and c which occur on the same lifeline, with a being above c, what are the possible traces?
Only one trace, a then c.
If you have two messages a and c which occur on different lifelines that do not exchange messages, with a being above c, what are the possible traces?
Two traces:
a then c
c then a
If you have three messages a, b and c which occur on different lifelines that do exchange messages, with a being above b and b being above c, what are the possible traces?
Only one trace:
a then b then c
What is a synchronous message?
- a message where the sender waits until it has received a response message before continuing
- represented by a solid line with a filled black arrowhead
What is an asynchronous message?
- a message where the seonder continuous without waiting for a response message
- represented by a solid line with an arrow at its head (but not an arrowhead)
What is a response message?
- a message that arises as a response to the sending of another message
- represented by a dashed line with an arrow at its head (not an arrowhead)
What is a found message?
One where the sender of the message is unknown or not relevant.
Represented as a normal message but with a black filled circle on the sending side rather than a lifeline
What is a lost message?
A lost message is one where the receiver of a message is unknown or not relevant.
Represented as a normal message but with a black filled circle on the receiving side rather than a lifeline
What is a time-consuming message?
A message with a duration, i.e., a message that expresses that time elapses between the sending and receipt of the message.
What is the alt combined fragment?
a combined fragment used to model alternative sequences
guards (in squared brackets) are used to select the one path to be executed
guards must be disjoint
there are multiple operands
What is the opt combined fragment?
a combined fragment used to model an optional sequence
actual execution is dependent on the guard
exactly one operand
What is the loop combined fragment?
expresses a sequence that is to be executed repeatedly
exactly one operand
next to keyword loop there is a parenthesis (min,max) specifying the minimal/maximal nr of operation
guard is evaluated as soon as the minimum nr of iterations has taken palce and checked for each iteration until the maximum is reached
if guard evaluates to false, looping stops
What is the break combined fragment?
form of exception handling consisting of exactly one operand with a guard
if guard is true, interactions within operand are executed and remaining operations of surrounding fragment are ommitted
instead, interaction continuous in the next higher level fragment
What is the seq order combined fragment?
- The ordering of events within each of the operands is maintained in the result.
- Events on different lifelines from different operands may come in any order.
- Events on the same lifeline from different operands are ordered such that an event of the first operand comes before that of the second operand.
What is the strict order combined fragment?
The order of event occurences on different lifelines between different operands is significant.
What is the par order combined fragment?
order of elements in different operands is irrelevant
order of elements in the same operand is relevant
What is coregion?
A way of creating an area where the order of event occurences is not restricted
area of the lifeline to be covered by the coregion is marked by square brackets rotated by 90 degrees