Lecture 6 - UML Sequence and State Diagrams Flashcards

(21 cards)

1
Q

What are UML Class Diagrams?

A

UML Class Diagrams describe the static structure of the system
– classes,
– class attributes,
– associations between classes,
– association roles and multiplicity

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

Cinema Booking Example

A

REFER TO SLIDES

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

What do Sequence Diagrams represent?

A

Sequence diagrams represent
- the interaction of participants (horizontally)
- over time (vertically)
- using messages to communicate

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

What are Sequence Diagrams?

A
  • Sequence diagrams represent the interaction of objects (horizontally) over time (vertically).
    *Showing how the behaviour of a use case is distributed amongst its participating objects allowing developers to find missing objects or resolve uncertainties
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the most important components in Sequence Diagrams?

A

1.The participating objects – what are the objects associated with the use case in consideration
2.The flow of events between these objects – what are the messages that might be sent from the sender object to the receiver objects?

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

What are the conventions for Sequence Diagrams?

A

Layout
Object Creation
Object Access

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

What are the conventions for Sequence Diagrams - Layout?

A

Layout:
1st column: corresponds to the actor who initiated the use case
2nd column: Should be a boundary object with which the actor interacts to initiate the case
3rd column: Should be the control object that manages the rest of the use case
4th column: An entity object representing long-lived info tracked

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

What are the conventions for Sequence Diagrams - Object Creation?

A

Object Creation:
– Control objects are created by boundary objects initiating the use case
– Other boundary objects are created by control objects

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

What are the conventions for Sequence Diagrams - Object Access?

A

Object Access:
– Entity objects are accessed by control and boundary objects,
– Entity objects should never access boundary or control objects:
This makes it easier to share entity objects across use cases
and makes entity objects resilient against technology-induced
changes in boundary objects.

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

Order Pricing Example

A

REFER TO SLIDES

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

Create New Online Library Account EXAMPLE

A

REFER TO SLIDES

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

When do you use Sequence Diagrams?

A
  • You should use sequence diagrams when you want to look at the behavior of several objects within a single use case.
  • Sequence diagrams are good at showing collaborations among the objects;
  • they are not so good at precise definition of the behavior.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are State Diagrams?

A
  • A UML state diagram is a notation for describing the sequence of states an object goes through in response to external events.
  • UML state machines are extensions of the finite state machine model.
  • A state is a condition satisfied by the attributes of an object.
  • An event is a potential trigger for a change of state
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a transition?

A

Indicates a move from one state to another

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

What do State Machine Models show?

A

Show how individual objects change their state in response to events.
REFER TO SLIDES FOR DIAGRAMS

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

In the context of behaviour modelling, 2 different characterizations of states must be considered, what are they?

A
  1. the state of each class, and
  2. the state of the system as observed from the outside as the system performs its function
17
Q

What are Statechart Diagrams?

A
  • Graphs whose nodes are states and whose directed arcs are transitions labelled by events.
  • States capture conditions which hold for a period of time
  • Events change the state (except internal)
  • Statechart diagrams represent behaviour from the perspective of a single object only– An object model with a set of objects must be represented by a set diagrams
18
Q

What is a state and what are its characteristics?

A

A state is a condition satisfied ny the attributes of an object
Example: State of a user interface screen
* logged in, logged out, active, idle
* active is an abstraction of all the user’s logged in activity
* State has duration

19
Q

What is an Event?

A
  • Something that happens at a point in time (e.g. button press, mouse click)
  • Triggers a transition– Internal transition (no state change)– External transition (change to different state)
  • May result in an action being executed
20
Q

State Chart Diagram vs Sequence Diagram

A
  • State diagrams help to identify:
    – Changes to objects over time
  • Sequence diagrams help to identify
    – The relationships between objects over time
    – Sequence of operations as a response to one or more events
21
Q

When do you use state diagrams?

A
  • State diagrams are good at describing the behavior of an object across several use cases.
  • State diagrams are not very good at describing behavior that involves a number of objects collaborating.