04-01-2018 11:41 PM
I am trying to build a coke machine which dispenses coke and fanta. However, whenever I insert the coins into the machine, it only dispenses out coke only.
I feel like I am making an assumption somewhere, but I am unaware where that might be. Can somewhat take a look and give me a few intakes?
Solved! Go to Solution.
04-02-2018 03:57 AM
None of your state decides to switch to "Dispense Fanta" then how your program will switch to "Dispense Fanta"
Recheck your code
04-02-2018 04:08 AM
Boolean buttons COKE and FANTA events are not connected/used in any states to decide which to dispense.
First make your requirement in a flow diagram and proceed with your implementation, problem in your design itself.
04-02-2018 06:43 AM
Can you help walk me through this? I'm kinda lost.
04-02-2018 07:41 AM
As PalanivelT stated, you really need to document what you want your application to do first. Make a state diagram chart showing how the states transition. Once you get that, then you can step through each state and make sure they are doing what they are supposed to.