I'm trying to build a table to describe the behaviour of the FSA for a coin change machine described below.
There is a slot that accepts a 50c coin and 2 buttons that a user can press to get a 20c or 10c coin as change. As soon as the 50c coin is inserted the machine locks to prevent another coin from being added. When the user presses the 20c button the machine checks that the remaining value is sufficient then gives the user a 20c coin. If the remaining value isnt sufficient the machine "dies" (for simplicity). The 10c button works similarly.
The events of the machine are insert50c, give20c, give10c.
So, from my understanding this FSA has 6 states lets say 0,10,20,30,40,50. The states are represented by the value of money remaining to be returned. I've drawn a rough state diagram here but am i missing any transitions?