deck_15618608 Flashcards

1
Q

What do interaction diagrams do? What four things do they show?

A

describe how objects interact to realise use case scenarios

  1. interactions of a system with its environment
  2. interaction between system parts in order to show how a specific use case can be implemented
  3. interprocess communication
  4. communication at class level
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does an interaction do?

A

specifies how messages and data are exchanged between interaction partners

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some examples of interactions?

A

can be conversations between people, message exchange between humans and a software system, communication protocols, sequences of method calls in a program, etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Four Types of Interaction Diagrams

A
  1. Sequence Diagram - chronological order on the vertical axis and interaction partners on horizontal axis
  2. Communication Diagram - focuses on who communicates with whom, does not have a separate time dimension, message order via decimal classification
  3. 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
  4. Interaction Overview Diagram:
    - allows to place various interaction diagrams in a logical order
    - basic notation concepts of activity diagram
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are interaction partners? How are they represented in sequence diagrams?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are roles for interaction partners?

A

a more general concept than objects, as an object can take on different roles over its lifetime

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How is object creation represented?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is object destruction represented?

A

a large cross at the end of a lifeline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does message exchange take place in a sequence diagram?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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?

A

Only one trace, a then c.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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?

A

Two traces:
a then c
c then a

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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?

A

Only one trace:
a then b then c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a synchronous message?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is an asynchronous message?

A
  • 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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a response message?

A
  • 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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a found message?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is a lost message?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is a time-consuming message?

A

A message with a duration, i.e., a message that expresses that time elapses between the sending and receipt of the message.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the alt combined fragment?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the opt combined fragment?

A

a combined fragment used to model an optional sequence

actual execution is dependent on the guard

exactly one operand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the loop combined fragment?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the break combined fragment?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the seq order combined fragment?

A
  1. The ordering of events within each of the operands is maintained in the result.
  2. Events on different lifelines from different operands may come in any order.
  3. 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is the strict order combined fragment?

A

The order of event occurences on different lifelines between different operands is significant.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is the par order combined fragment?

A

order of elements in different operands is irrelevant

order of elements in the same operand is relevant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What is coregion?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is the critical combined fragment?

A

Represents an atomic area in the interaction, with one operand.

Makes sure that certain parts of an interaction are not interrupted by unexpected events.

Within critical area, the seq default order applies.

28
Q

What is the ignore combined fragment?

A

Used to indicate irrelevant messages

one operand

operand may contain multiple messages, but irrelevant ones are mentioned in curly brackets after “ignore”, e.g., ignore {status} where status is one of multiple messages in operand

29
Q

What is the consider combined fragment?

A

Used to specify those messages that are of particular importance for the interaction under consideration

Exactly one operand

Considered messages in curly brackets after keyword consider

30
Q

What is the assert combined fragment?

A

Used to identify certain modelled traces as mandatory

If the sequence within assert does not take place exactly as specified, an error occurs

involves exactly one operand

31
Q

What is the neg combined fragment?

A

Used to model invalid interactions, describing situations that must not occur

an error is thrown if the sequence in the neg statement occurs

involves exactly one operand

32
Q

Steps involed in Building Sequence Diagrams

A
  1. Set context
  2. Identify participants that should interact to realise the use-case scenarios
  3. Set lifeline for each participant
  4. Add messages by drawing arrows, ordering messages from left to right, top to bottom, and showing how they are passed from one object to another
  5. Add activations to each participant’s lifeline
  6. Validate the sequence diagram.
33
Q

What is an interaction reference?

A

the integration of one sequence diagram in another sequence diagram

34
Q

How is an interaction reference carried out?

A

Within another sequence diagram, add a rectangle with ref in the top left corner and the name of the integrated diagram in the center of the rectangle

35
Q

What is a gate in the context of sequence diagrams?

A

allows the sending of message in between different sequence diagrams

is denoted by arrows pointing towards the edge of sequence diagram tables or from the edges (depending on whether the message is being sent or received)

36
Q

What is a continuation marker?

A

A large rounded rectangle that allows control to be passed to another part of a sequence diagram

works only inside alt combined fragments

37
Q

Can sequence diagrams have parameters and local attributes? If so, how are they represented

A

Parameters: sd func(int par1, int par2)

Local attributes:
x: int = 0
y:String = “Test”

38
Q

Three Types of Time Constraints for Sequence Diagrams

A
  1. Relative:
    e.g., after(5sec)
  2. Absolute:
    e.g., {at(12:00)}
  3. Time period between two events:
    e.g.,:
    {lower…upper}
    {max. 2h}
39
Q

What are state invariants in sequence diagrams?

A

Assertions that a certain condition must be fullfiled at a certain point in time

Always assigned to a specific lifeline

Evaluation before subsequent event occcurs

If state invariant untrue, model/implementation is incorrect

40
Q

What is validation when speaking about sequence diagrams?

A

refers to the consistency of a sequence diagram with class and use case diagrams

41
Q

What is an activity?

A

the specification of user-defined behaviour at different levels of granularity

42
Q

How is an activity represented in Activity Diagrams?

A

a directed graph where the nodes are actions and activities and the edges are for control and object flow

also can optionally contain parameters, preconditions, and postconditions

43
Q

What is an action?

A

an atomic, basic element used to specify user-defined behaviour

can be described in natural or programming language

44
Q

Two Types of Edges in Activity Diagrams

A
  1. Control flow edges:
    - define the order between nodes
    - illustrated as normal arrowed lines
  2. Object flow edges:
    - used to exchange data or objecfcts
    - express a data/causal dependency between nodes
    - illustrated as arrow lines with half squares on each side
45
Q

Guards for Edges in Activity Diagrams

A

checked before control and object flow continue

46
Q

Types of Actions

A
  1. Event-based actions
  2. Call behaviour actions
47
Q

What are the three types of event-based actions?

A
  1. Signal actions:
    - used to send signals
    - e.g., send grade
    - denoted by an arrow-like shape
  2. Event actions:
    - used to accept events
    - e.g., fire alarm sounds
    - denoted by a bookmark type shape
  3. Time Event Actions:
    - used to accept time events
    - e.g., semester ends
    - denoted by an hourglass type shape
48
Q

What are call behaviour actions?

A

actions that call an activity

illustrated by a rounded rectangle where the name of the called activity is the name of the call behaviour action

there is also a small fork in the bottom right corner

49
Q

What is an initial node in an activity diagram and how is it represented?

A
  • the node that starts the execuction of an activity, provides tokens (control flow) at all outgoing edges
  • keeps tokens until successive nodes accept them
  • multiple initial nodes can be used to model concurrency
  • represented by a black, filled circle
50
Q

What is an activity final node and how is it represented?

A
  • a node that ends all flows of an activity
  • first token that reaches it terminates the entire activity
  • leads to the deletion of other control and object tokens
  • represented by a white circle with a subcircle that is black and filled
51
Q

What is the flow final node in activity diagram?

A

a node that ends only one execution path of an activity

all other tokens of the activity remain unaffected

represented by an unfilled circle with an X in the middle

52
Q

What is a decision node in an activity diagram?

A

helpful in defining alternative branches, like a switch point for tokens

edges outgoing from decision node have guards, with the token taking exactly one branch (guards mutually exclusive)

decision behaviour specifies the behaviour that is necessary for the evaluation of the guards

represented by a slight inverted square

53
Q

What is a merge node in an activity diagram?

A

used to bring alternative subpaths together

passes the token to the next node

same representation as decision node

54
Q

What is a parallelisation node in an activity diagram?

A

a node used to split paths into concurrent subpaths

duplicates token for all outgoing edges

55
Q

What is a synchronisation node in an activity diagram?

A

a node used to merge concurrent subpaths

waits until tokens are present at all incoming edges and merges all control tokens into one token

56
Q

What is a connector in an activity diagram?

A

a notation used to connect two actions / activities that are very far away from one another in the diagram

first action sends a line to a circle with a letter in it anywhere in the graph

second actions gets a line sent to it from a circle with the same letter at a different place in the graph (close to it)

57
Q

What is a token in an an activity diagram?

A

a virtual coordination mechanism that describes execution exactly

if an action receives token, it can be executed

when an action has completed, it passes token to a subsequent action and the execution of this action is triggered

guards can prevent passing of token, meaning that tokens are stored in the previous node

Control token: execution permission for a node
Object token: transport data + execution permission

58
Q

What is an object node in an activity diagram?

A

a node containing object tokens

represents the exchange of data/tokens

can include optional information of type and state

it is a rectangular node without rounded edges which describes the object name, the type of the object name, and the state

format: objectName:type [state]

59
Q

Notation of object nodes as parameters

A
  1. For activities:
    - square object nodes using described format, one on left of activity and one on right.
    - left one is the input, right one is the output
  2. For actions:
    - small half squares on either side of the edge, with the previously mentioned description above the small half squares (objectName:type [state])
60
Q

What is a central buffer in an activity diagram?

A
  • a square node with the notation <> above
  • used for saving and passing on object tokens (temporary memory)
  • accepts incoming object tokens from object nodes and passes them onto other object nodes
  • object tokens deleted when they are read from the central buffer
61
Q

What is a data store in an activity diagram?

A
  • represented by a square node with the notation <> above it
  • used for saving and passing on object tokens (permanent memory)
  • saves object tokens permanently, passes copies to other nodes
62
Q

What is the weight of an edge in an activity diagram?

A

the minimal number of tokens that must be present for an action to be executed

can make use of all or *

default is 1

63
Q

What are partitions in activity diagrams?

A

allow the grouping of nodes and edges of an activity due to responsibilities, which reflect organisational units or roles

makes the diagram more structured but does not change the execution semantics

64
Q

What is exception handling in activity diagrams?

A

uses predefined exceptions to define how the system has to react in a specific error situation

the exception handler replaces the action where the error occured

65
Q

What is an interruptible activity region?

A

a group of actions whose execution is to be terminated immeditately if a specific event occurs

in that case, some other behaviour is executed

there is no jumping back to regular execution

denoted by a dashed square surrounding some actions, an event action representing the occurence of the error, and then an error handling action/activity