Azm Amn

Azm Amn

  • NA
  • 108
  • 17.8k

Java Applet need help

Apr 26 2015 12:19 AM
Use your skills and creativity in developing Java Applet to design a Coffee Vending Machine which dispenses the following hot coffee. The list of coffee are:


Café Americano RM 13.50
Café Bombon RM 13.75
Espresso Granita RM 14.25
Cappuccino RM 13.10
Café Latte RM 13.85
Café Mocchiato RM 15.10
Café Mocha RM 16.00
Café Latte Fredo RM 17.25
Cafe Latte Frappe RM 18.30
 
Any drinks can be purchased from the vending machine. At the beginning of the applet, the machine should have a supply of 30 cups for each of the coffee. Every time an order is placed for the coffee, the count of the cup should be reduced by 1 and so on. When there is no cup and the user selects the particular option, the machine should display “NO Stock”.
Create buttons for the following denominations which can be selected by the user as input price for the coffee:
10 cents
20 cents
50 cents
1 ringgit
2 ringgit
5 ringgit
10 ringgit
20 ringgit
When the user keeps clicking the buttons, the amount should be added and then when the order has been placed for coffee, the machine should be able to dispense the balance amount.