Question: Write a Java Program: Online Shopping 2.0 - part 2 You will continue working on your Online Shopping assignment. You will add the following components:
Write a Java Program:

Online Shopping 2.0 - part 2 You will continue working on your Online Shopping assignment. You will add the following components: Anywhere that a menu appears in the program, if the user makes a choice that is not in the menu, they MUST be told that they made an incorrect choice and be allowed to choose again. How can I help you today? 1. Add to cart 2. Remove from cart 3. View cart 4. Checkout 5. Cancel Choose a menu option (1-5): 0 That is not a valid option. Choose a menu option (1-5): That is not a valid option. Choose a menu option (1-5): . The user should not be able to add (or remove) a negative number. . The user should not be able to remove more of what they currently have i.e. should not have a negative amount of items) What would you like to add to your shopping cart? 1. Apples ($0.75) 2. Bananas ($0.50) 3. Carrots ($0.25) 4. Dragonfruit ($7.50) 5. Eggplant ($1.75) Choose a fruit/vegetable (1-5): 1 How many would you like to add: -8 You cannot add a negative amount. Try again. How many would you like to add: . When the user checks out, surprise them with a coupon. They will receive a certain percentage off (the percentage will be randomly determined by your code). Thank you for shopping with us, Jack Congratulations, you have been awarded with +33% off your purchase! ITEMS QUANTITY PRICE 0 Apples Bananas Carrots Dragonfruit Eggplants 0 0 0 $5.25 $0.00 $0.00 $0.00 $0.00 SUBTOTAL COUPON TAX TOTAL $5.25 -$1.73 $0.46 $3.97 Thanks for shopping at Walmart
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
