Question: Your task is to create a console application that allows for the calculation of the total amount due for purchases. This application should allow any

Your task is to create a console application that allows for the calculation of the total amount due for purchases. This application should allow any number of items to be entered, and should then determine the total due including sales tax and shipping. The following rules are used to determine the amount due.

There is a global sales tax of 10.0%.

Shipping charges are determined based on the number of items order. less than 3 - $3.50 between 3 and 6 - $5.00 between 7 and 10 - $7.00 between 11 and 15 - $9.00 more than 15 - $10.00

The program should display a welcome message, and ask the user to press 'enter' to begin. They can then enter the cost of any number of items. They will be asked to enter the amount, then asked if they want to continue entering more items by entering 'Y' or 'y' to continue, or 'N' or 'n' to stop (you must accept both the lower-case and upper-case!). Remember that you must use Console.ReadLine() here, not Console.ReadKey()

If the user enters a non-numeric input for the price of an item, they should be prompted to re-enter.

If the user enters a negative input for the price of an item, they should be prompted to re-enter.

An item price of $0 is okay.

The program should continue to ask for input until 'N' or 'n' is entered to stop. Once the program has stopped, it should display a sales receipt with the total purchases, the sales tax, the number of items purchased, the shipping charge, and then the grand total.

For example, this would be the receipt for 3 items of cost $8, $10, and $20.

 ----------------------------------------- Sales Receipt Total Purchases: $38.00 Sales Tax: $3.80 Number of Items Purchased: 3 Shipping charge: $5.00 ----------------------------------------- Grand Total: $46.80 

Please be careful to make sure that your receipt displays correctly, especially that it writes exactly Total Purchases:, Sales Tax:, Number of Items Purchased:, Shipping charge:, and Grand Total:

Example screenshots:

Your task is to create a console application that allows for the

calculation of the total amount due for purchases. This application should allow

USE CODE:

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PurchaseApp { class PurchaseCalc { public static void Main() { // You aren't provided with any example code for this exercise // Your task is to write this program from scratch Console.WriteLine(" Hit Enter to exit."); Console.ReadLine(); } } }

This application computes the total due for your purchases. It will allow you to enter any number of purchase amounts, and then display a receipt. Press enter when you are ready to begin... What is the amount of the item? - 10 Do you want to enter more purchases? -Y or N y What is the amount of the item? 2.5 Do you want to enter more purchases? -Y or N y What is the amount of the item? - 16 Do you want to enter more purchases? -Y or N y What is the amount of the item? -9 Do you want to enter more purchases? - Y or N n Sales Receipt Total Purchases: Sales Tax: Number of Items Purchased: Shipping charge: $37.50 $3.75 4 $5.00 Grand Total: $46.25 Hit Enter to exit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!