A finite state machine or finite state automaton or simply state machine, is a model of behavior composed of finite number of stated, transitions between those states, and actions. A finite stat machine is an abstract model of a machine with a primitive internal memory. A current state is determined by past states of the system. As such, it can be said to record information about the past, it
. reflects the input changes from the system start to the present moment. A transition indicates a state change and is described by condition that would need to be fulfilled to enable the transition. For more you can go to http://www.objectvalue.com/articles/CppFiniteStateMachine.html