State Tables and State Machines Flashcards
1
Q
When would one use a State Table?
A
For straight forward sequences where tasks are executed one after another.
2
Q
When would one use a State Machine?
A
For more complex sequences where the order varies on the fly depending on inputs.
They are a more powerful way to design which handles events and sequences.
3
Q
What does one consider when implementing a State Machine?
A
The states of the system including the default state.
The condition which is usually some criterion that must be satisfied.
The transition which is the act of changing to a new state.