Unit 7 Key Points Flashcards

1
Q

What are the benefits of state machines?

A

They are a means of elaborating potential operations within a class.

They help understanding the behaviour of an object over its lifetime. The more often an attribute of an object changes the more likely you are to want to model it in a state machine.

They ease understanding of how an object must respond to events.

Ensure correctness.

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

Name three features of all state machine diagrams?

A

states - e.g. extended/retracted.

events - e.g. button clicked.

transitions - e.g. transit from extended to retracted.

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

What is a state machine?

A

A state machine is a model that shows how an object changes from state to state in response to events.

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

UML lets us describe five things about a transition. What are they?

A
  1. Source state
  2. Target state
  3. Event trigger
  4. Action
  5. Guard
How well did you know this?
1
Not at all
2
3
4
5
Perfectly