Question: Write a Java program which: (1) Prompts a user to enter customer id, unit price in this format (e.g. 3.75), quantity (as whole number), product
Write a Java program which: (1) Prompts a user to enter customer id, unit price in this format (e.g. 3.75), quantity (as whole number), product description, and discount

Write a Java program which: (1) Prompts a user to enter customer id, unit price in this format(e.g. 3.75), quantity (as whole number), product description, and discount in this format(e.g.,.10) (use Scanner for input). (2) Calculates the customer's overall order total before and after discount. (3) Displays the input data along with the order total before and after the discount to the console. To calculate order total before discount (unit price multiplied by quantity) To calculate order total after discount (unit price multiplied by quantity) multiplied by minus (unit price multiplied by quantity) multiplied by discount Example 1: For this example, given unit price of 5.00 with a quantity of 2, and the discount of 10: (5.00*2)=10.00 order total before discount and (5.00-2)* I (5.00*2)* 10 -9.00 order total after discount Example 2: For this example, given unit price of 7.00 with a quantity of 3, and the discount of .15: (7.00*3)=21.00 order total before discount and (7.00*3)* 1 (7.00*3)*.15-17.85 order total after discount Example 3: For this example, given unit price of 12.50 with a quantity of 2, and the discount of 10: (12.50*2) - 25.00 order total before discount and (12.50*2) 1 - 12.50*2) *.10 - 22.50 order total after discount Summary of the Examples: Example Unit Price Quantity Disco 1 2 3 3 5.0 7.0 12.50 2 3 2 2 .10 .IS .10 Total Price (Before Discount) 10.00 21.00 25.00 Total Price (After Discount) 9.00 17.85 22.50 Test program: A minimum of 3 test cases should be supplied in the form of table with columns indicating the input values, expected output, actual output and if the test case passed or failed. This table should
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
