Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment: Cash Fundraising Cashier Write a program that prompts the user for the price of an item that the customer purchases and the amount

image

Assignment: Cash Fundraising Cashier Write a program that prompts the user for the price of an item that the customer purchases and the amount of money the cashier receives from the customer (amount paid). Based on the item price entered by the user calculate the 5% tax and calculate the total item cost including the 5%tax. Given the total item cost and the amount received from the customer calculate the change given back to the customer. Because this is a fundraising event, the cashier can only return money owed to the customer in five-dollar bills. Any change smaller than five dollars is kept by the cashier to raise funds. For example, if the cashier owns the customer $16.50 then the customer will receive three five-dollar bills and the cashier will keep $1.50. If the cahier owns the customer $4.98, the customer will get zero back and the cashier will keep $4.98. The program performs the following operations: Asks the user for the item price Asks the user for the money given (paid) by the customer Calculates the 5% tax Calculates the total cost of the item including the tax Calculates the change given back to the customer base on the total cost of the item and money given by the customer Calculates the number of five dollars bills included in the change given back to the customer Display all the entered and calculated values. Sample output: Enter Item Price in dollars-> 2.50 Enter Money Inserted in dollars -> 10 Item cost without taxes 2.5 Money Inserted: 10.0 PST amount: 0.125 Total cost: 2.625 Total amount due to the customer: 7.375 Number of $5 bills paid back to the customer: 1

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_2

Step: 3

blur-text-image_3

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

Java Concepts Late Objects

Authors: Cay S. Horstmann

3rd Edition

1119186714, 978-1119186717

More Books

Students also viewed these Programming questions

Question

Evaluate the following, accurate to the nearest cent.

Answered: 1 week ago

Question

Evaluate each of the following, accurate to the nearest cent.

Answered: 1 week ago

Question

Evaluate the answers accurate to the cent.

Answered: 1 week ago