I want to write a state machine using queues
Meaning :Each state has two or more operations
After each operation is there that operation from the given state should be removed ;and only after all operations are done ,the state should be dequeued from the queuue and we should move forward to the next state