Exercise 6-11 (Candy machine FSM)