Question
Please use Java Swing *Hardcode it* Create a GUI java program that display a summary of a sale by a customer. The frame should have
Please use Java Swing *Hardcode it*
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started