Question: Object-Oriented Programming Help Need help to understand what I am doing wrong, Thank you! Introduction to Object-Oriented Programming Programming Assignment - Discount Coupon A hardware
Object-Oriented Programming Help



Need help to understand what I am doing wrong, Thank you!
Introduction to Object-Oriented Programming Programming Assignment - Discount Coupon A hardware store awards coupons depending on how much a customer spends. For example, if you spend $45, you will get a coupon worth 596 percent of that amount The following table shows the percent used to calculate the coupon awarded for different amounts spent. Write a program that calculates and prints the value of the coupon a person can receive based on the items purchased, and the amount paid after the discount is applied Money Spent Coupon Percent Less than $10 Between $10 and $50 Between $50 and $75 Between $75 and $125 Between $125 and $200 More than $200 No co 5% 10% 15% 18% 20% Note, as specified, it is not clear how to handle boundary conditions. For example what is the coupon percent for $125.25? Is the discount 15% or 18%? You should decide how you are going your choice in the program documentation to handle boundary conditions and be sure to explain Your program should use a currency instance for formatting dollar amounts anda percent instance for formatting percents. Both can be found in the jaya,text.NumberFormat package. Do not print $ and % as characters in your print statements. The number formatters should take care of them Here is a sample run: Output-CouponDiscount(run) run: Please enter the cost of your purchase: 78.24 You earned a discount coupon of $11.74. (15% of your purchase) Please pay $66.50. Thank you for shopping with us! BUILD SUCCESSFUL (total time: 6 seconds) When your program includes multiple alternatives, you need to test all of the possible branches of your program. Let's assume that you do not enter costs less than zero. Test each branch of your program using the inputs below. Compare your ans wers with those below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
