Question
Vending Machine Applet that can dispense 3 varieties of chips $0.65, 5 varieties of drinks $1.25 and 4 varieties of cookies/crackers $0.75. When the applet
Vending Machine Applet that can dispense 3 varieties of chips $0.65, 5 varieties of drinks $1.25 and 4 varieties of cookies/crackers $0.75.
When the applet starts, the drink machine should have a supply of 20 of each of the drinks. The applet should have a text field where the user can enter the amount of money he or she is giving the machine. The user can then click on a button to select a drink to dispense. The applet should also display the amount of change it is giving back to the user. The applet should keep track of its inventory of drinks and inform the user if he or she has selected a drink that is out of stock. Be sure to handle operator errors such as selecting a drink with no money entered and selecting a drink with an inadequate amount of money entered.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started