newbie needs help in GUI assignment
I have to write a Java GUI application that simulates a Nescafe Vending Machine. 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.
I have to define and use a class named Coffee in the application to represent an object of each drink provided by the machine, also include suitable attributes and methods in the class.