This class represents a Finite State Machine. It can be only in one possible state at a time out of the set of possible states S. It can handle events from the set E.