Question: Do this in JAVA A supermarket awards coupons depending how much a customer spends on groceries. For example, if you spend $50, you will get
Do this in JAVA
A supermarket awards coupons depending how much a customer spends on groceries. For example, if you spend $50, you will get a coupon worth 8% 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 a coupon a person can receive based on groceries purchased. Make sure to put your name in comments.
Here is a sample run:
Welcome to Greg's Groceries!
Please enter the cost of your groceries: 14
You win a coupon of $1.12 (8% of your purchase)
| Money Spent | Coupon Percentage |
| Less than $10 | No coupon |
| From $10 to $60 | 8% |
| More than $60 to $150 | 10% |
| More than $150 to $210 | 12% |
| More than $210 | 14% |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
