Calculate the cost of selected items


Assignment

Task

Your task is to develop a Java Application that allows the user to buy items from a vending machine. The machine has three drop down lists to select available items, calculate the cost of selected items, display the total cost, pay the cost and release the item. The application should contain a GUI as shown below. The GUI components should consist of 1 Label, 3 Combo boxes/drop down lists (Select Candy, Select Gum, Select Chips), 1 Text Area and 4 Buttons (Show Total Cost, Pay Cost, Release Item, Exit). The layout managers are not used in this assignment. The components should be in the same order as shown below.

The functions of the four buttons are described below.

1. Show Total Cost

The Show Total Cost button displays the total cost for the selected items as shown below. If no item is selected then this button should display zero.

2. Pay Cost

The Pay Cost button accepts money and displays an appropriate receipt with a change as shown below.

3. Release Item

The Release Item button checks if money has been paid and dispenses the purchased item by displaying a message as shown below.

4. Exit

The Exit button should allow the user to exit from the application.

Format your assignment according to the following formatting requirements:

1. The answer should be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides.

2. The response also include a cover page containing the title of the assignment, the student's name, the course title, and the date. The cover page is not included in the required page length.

3. Also Include a reference page. The Citations and references should follow APA format. The reference page is not included in the required page length.

Attachment:- Assignment-Data.rar

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Calculate the cost of selected items
Reference No:- TGS02111126

Now Priced at $45 (50% Discount)

Recommended (94%)

Rated (4.6/5)