Vending Machine java GUI

April 20, 2011 at 10:18:33
Specs: Windows XP
Write a Java GUI application that simulates a Nescafe Vending Machine as shown. The simulated machine dispenses the following choices of drinks drinks: latte, white coffee, cappuccino, mocha, and black coffee. Each drink has different cost each to purchase.

The user interface named MyGUI should provide a Frame showing the simulated machine interface. The machine should have a supply of 10 cups of each of the drinks. It should also have a textfield where the user can enter the amount of money he or she is giving to the machine. The user can click on a button to select a drink to dispense. The application should also display the amount of change it is giving back to the user. It should also keep track of its inventory of drinks and inform user if he or she has selected a drink that is out of stock. Include necessary exceptions handling in your code. Perform also validation on input fields such as selecting a drink with no money entered or selecting a drink with inadequate amount of money.

Define and use a class named Coffee in your application to represent an object of each drink provided by the machine. Include suitable attributes and methods in your class.

Add your own creativity to the system but do not change the basic requirements.

See More: Vending Machine java GUI

Report •

April 20, 2011 at 13:46:41
So, how's the homework going? Nice of you to share it with us.

Report •
Related Solutions

Ask Question