Question: Question: Create a Java vending machine using a form. Here is the text of the problem that I am trying to figure out: Final Project:

Question: Create a Java vending machine using a form.

Here is the text of the problem that I am trying to figure out:

Final Project: Java Simulate a vending machine

Question: Create a Java vending machine using a form. Here is the

Operation

This is a java application that simulates a vending machine that dispenses soft drinks.

The Quarter button deposits $0.25.

The Dollar button deposits $1.00.

The label indicates the current credit.

The Refund button refunds the customers credit.

The slot buttons display the name of the product currently loaded in one of the vending machines six slots. The example above shows that the vending machine is loaded with Pepsi, Diet Pepsi, Mountain Dew, Dr. Pepper, Root Beer, and Water.

When the program starts, the six slot buttons are disabled. The program enables these buttons when the user has a credit of at least $1.00 (the cost of one item).

If the user clicks one of the slot buttons, the program displays a dialog box that tells the user to enjoy the beverage. For example, Enjoy your Diet Pepsi.

If the user clicks Refund, the program displays a dialog box that asks the user to take his or her change. For example, Please take your change of $1.25.

Specifications

You may design any classes you wish to use for this application. For example, you may want to create a class that defines a vending machine or a beverage.

Each slot in the vending machine can hold up to 10 bottles. The application should keep track of how many bottles are available in each slot and display a dialog box with the message Out of Stock if the user selects a beverage thats out of stock.

Disable the beverages button if the beverage is out of stock

Create a report button on this page that can be clicked that will show the current sales of sodas (Soda name, Qty & Revenue). The report should be implemented by using a second jframe (Java) or Acivity(Android) and have a button to return the user to the first form.

All data should be stored permanently such that if the application is stop/closed and re-opened the Soda Machine will still have the correct inventory.

Vending Machine Quarter Pepsi Diet Pepsi Mountain Dew Dr. Pepper Root Beer Water Dollar $0.00 Refund

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!