Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A hardware store awards coupons depending on how much a customer spends. For example, if you spend $45, you will get a coupon worth 5%

A hardware store awards coupons depending on how much a customer spends. For example, if you spend $45, you will get a coupon worth 5% 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 No coupon Between $10 and $50 5% Between $50 and $75 10% Between $75 and $125 15% Between $125 and $200 18% More than $200 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 to handle boundary conditions and be sure to explain your choice in the program documentation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions