. FSM ( ), , FSM - .
As a real-life example, I created a small utility to restore a specific file type once. There were only 3 or 4 possible ways of interacting with the user:
- show a small message, select a file (perhaps cancel and start again),
- recovery file (possibly cancel and exit with an error message),
- show confirmation message.
The creation of a finite state machine made these paths obvious and easy to implement.
source
share