draw a flowchart of the given problem, and then convert that flowchart into Java code. A supermarket awards coupon depending on how much a customer spends on groceries. For example, if you spend $50, you will get a coupon worth eight 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 groceries purchased. Here is a sample run: Please enter the cost of your groceries: 14 You win a discount 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%

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 12PE
icon
Related questions
Question

In this task, you are being asked to draw a flowchart of the given problem, and then convert that
flowchart into Java code.
A supermarket awards coupon depending on how much a customer spends on groceries. For
example, if you spend $50, you will get a coupon worth eight 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 groceries
purchased.
Here is a sample run:
Please enter the cost of your groceries: 14
You win a discount 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%

NOTE : using java 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT