Question: Create a GUI java program that display a summary of a sale by a customer. The frame should have labeled textfields to accept the persons

Create a GUI java program that display a summary of a sale by a customer. The frame should have labeled textfields to accept the persons name, Quantity and Price on the left side of the frame. On the right side of the frame, have a single selection listbox with the following UPC values: 111, 123, 555, 789. (We are not in the database chapter yet. These codes are representing choices the user can make for the products they just searched for.)

There also needs to be a checkbox and labeled textfield for a possible coupon code. Include a button to Display the Order summary in a Jtextarea in the following general format:

Name: Bob Smith

UPC of Purchase: 123

Subtotal: 18.56

Discount for Coupon: 3.00

Total Bill: 15.56

If the user checks the checkbox indicating they have a coupon. Take the code they enter into the textfield for this purpose and either apply the discount when the summary button is pressed or give a JOptionPane telling them the coupon they received in the mail is no longer valid.Here are the valid codes and their discount for an order using them: ReturnCustomer 3.00 off, HappyBirthday 5.00 off.

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!