Write an applet that simulates a soft drink vending machine


Problem

Make a New Java Project called TheDrinkMachine.

Write an applet that simulates a soft drink vending machine.

The simulated machine dispenses the following soft drinks: cola, lemon-lime soda, and bottled water. These drinks cost $0.75 each to purchase.

When the applet starts, the drink machine should have a supply of 10 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.

NOTE: Your applet must be embedded in a webpage. The webpage should have an appropriate title and description of the applet. Feel free to add color and excitement to your webpage. Be sure to follow the instructions on "How to Create and Deploy an Applet" to add your webpage to your project. Export your project as usual for submission.

Request for Solution File

Ask an Expert for Answer!!
Business Management: Write an applet that simulates a soft drink vending machine
Reference No:- TGS02780617

Expected delivery within 24 Hours