Soda Programming Help
hi, i need help with this soda machine program. i am trying to make the program validate if there is any money or enough money is in the machine. i am also trying to give back the amount of change when the user input the money over the price of the product. Thanks in advance for the help. I am also uploading the program i have written so far.

Suthish NairRank #92 · 22.8K reputationPosted Mar 16, 2011, 12:04 PM EDT
Sam HobbsRank #108 · 20.5K reputationPosted Mar 16, 2011, 3:27 PM EDT
snoun14 reputationPosted Mar 16, 2011, 6:05 PM EDT
Sam HobbsRank #108 · 20.5K reputationPosted Mar 16, 2011, 6:42 PM EDT
snoun14 reputationPosted Mar 16, 2011, 6:50 PM EDT
Sam HobbsRank #108 · 20.5K reputationPosted Mar 16, 2011, 7:34 PM EDT
I like that you have objects (classes). That is good. I notice that Money is derived from Product. That seems strange to me. It might be correct for the way you are doing things but based on my initial quick look I think that is strange. I will look at it more later.
snoun14 reputationPosted Mar 16, 2011, 7:45 PM EDT
Sam HobbsRank #108 · 20.5K reputationPosted Mar 16, 2011, 10:13 PM EDT
Note that whatever you do, dk, pt and pb must be a member of Form1, not local to Form1_Load. That is probably one problem / solution you need to understand. Then in each of the button's click event you know what drink to use.
Does that help?