This solution uses a technique
called - "output coded states" which leads to a
Moore type State Machine.
I could be necessary to add
extra F/F's in order to make every states coding
unique.
In order to remove bouncing effects from the
button is the Q-Shiftregister added to the design.