Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C#, create an application that determines the total due on purchases including sales tax and shipping charges. Allow the user to input any number

Using C#, create an application that determines the total due on purchases including sales tax and shipping charges. Allow the user to input any number of item prices. Use a do-while loop such that in the first iteration, you ask the user to enter the price for an item. Keep a counter variable to track the number of items the user has entered by incrementing its value at every iteration. As the last statement for the do{} construct, ask the user if they wish to enter more item prices. Re-execute the do-while loop if the user enters yes.

Shipping charges are determined based on the number of items purchased using the following chart (if necessary, use if/else statements for making this decision).

Fewer than 3 items $3.50

3 to 6 items $5.00

7 to 10 items $7.00

11 to 15 items $9.00

More than 15 items $10.00

In addition to the above, if the total purchase (before adding sales tax) is $100.00 or more, then provide free shipping. If the user is $10.00 or less away from reaching a total purchase of $100.00, then display a message prompting the user that they are that many dollars away from free shipping. This should be implemented in a way that allows the user to continue entering items if they are close to free shipping.

Sales tax of 7.75% is charged against the total purchase. Display an itemized summary to the user with the following information. Total purchase charge, number of items purchased, sales tax amount, shipping charge, and the grand total. Use proper format specifiers if necessary.

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

Would either outcome have changed if the girl had become very ill?

Answered: 1 week ago