Unit 7 Key Points Flashcards
What are the benefits of state machines?
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.
Name three features of all state machine diagrams?
states - e.g. extended/retracted.
events - e.g. button clicked.
transitions - e.g. transit from extended to retracted.
What is a state machine?
A state machine is a model that shows how an object changes from state to state in response to events.
UML lets us describe five things about a transition. What are they?
- Source state
- Target state
- Event trigger
- Action
- Guard