You will write a program that will calculate the order tax (tax) ,

 

You will write a program that will calculate the order tax (tax) , the net cost (netCost) , and the total cost (totalCost)
of an online order.
• Assume the following tax rates (taxRate) based on the ID of the location (locationID)
o 0 <= locationID <= 50– TAX rate is 4% (.04)
o 51 <= locationID <=80 – TAX rate is 5.25% (.0525)
o 81 <= locationID <= 100– TAX rate is 6% (.06)
o locationID > 100 – TAX rate is 7.25% (.0725)
o < 0 – is not a valid entry for the locationID
• Use a string for the users first name only as you interact with the user
• Use a string for the cell phone number
• Use a string for the item number
• Use a string for the user letter input (“y” or “n”)
• Use int and double, not float
• The tax on the order is calculated by multiplying the quantity * price * taxRate /100
o Note: drop the 100 if you converted the rate from percentage
• The net cost is calculated by multiplying the quantity times the price
• The total cost will be calculated by adding the netCost and the tax
• All double output should be presented with 2 decimal places
• Use four functions to break up the program (functions may not be modified)
//BE SURE TO ADD COMMENTS TO THE FUNCTION PROTOTYPES AND THE FUNCITON DEFINITIONS
//fill out the pre and post conditions
void GetOrderInfo(string&, string&, int&, double&, int&);
//Precondition: State what is true before the function is called.
//Postcondition: State what is true after the function has executed.
//Description: Describe what the function does.
void GetTaxRate(double&, int);
//Precondition: State what is true before the function is called.
//Postcondition: State what is true after the function has executed.
//Description: Describe what the function does.
void CalculateResults(int, double, double, double&, double&, double&);
//Precondition: State what is true before the function is called.
//Postcondition: State what is true after the function has executed.
//Description: Describe what the function does.
void DisplayResults(string, string, int, double, int, double, double, double, double);
//Precondition: State what is true before the function is called.
//Postcondition: State what is true after the function has executed.
//Description: Describe what the function does.

The user will enter phone number (as a string) , the item number (as a string), the quantity (as an integer), the price (as a
double), and the location ID (as an integer) For program 2 you must use the following functions exactly as described above
(same name and same formal parameter data types in the same order)
These 4 functions MUST be called from the main function.
The purpose of the assignment is to practice pass by value and pass by reference.
You may add additional functions, but you MAY NOT modify the name or the formal parameters of the above
4 functions.
Additional instructions:
• Be sure to comment your code
• Include a program header with the following information:
o Name, due date, course, assignment number, professor name, and a brief description of the
assignment – see the sample skeleton provided with the assignment.
• Read all comments in the sample code before getting started
• Read the problem and determine what to do
• Write the algorithm (you DO NOT need to submit the algorithm)
• Implement one component at a time in your code and do not move onto the next component until you
are sure it is correct.
• Test your program before submitting
• One source code file (unformatted text) will be submitted
• The file name must match the assignment
• The code should be tested and run on a Microsoft compiler before it is uploaded onto Canvas
• The code must be submitted on time in order to receive credit (11:59 PM on the due date)

SAMPLE OUTPUT:
Enter your first name: Tami
Enter the cell phone number: 5612312233
Enter the item number? qwAs-rqwst123
Enter the quantity? 14
Enter the price? 17.12
Enter the location ID number? 52
Cell number: 5612312233
Item number: qwAs-rqwst123
Quantity: 14
Price: 17.12
Tax rate: 5.25%
tax: $12.58
Net cost: $239.68
total cost: $252.26
Tami, would you like to do another calculation (Y or N):
y
Enter the cell phone number: 5612129876
Enter the item number? trWq21vcx-hrJ
Enter the quantity? 200
Enter the price? 15.50
Enter the location ID number? -34
A negative number for the location ID is not a valid entry.
Cell number: 5612129876

Item number: trWq21vcx-hrJ
Quantity: 200
Price: 0.00
Tax rate: 0.00%
tax: $0.00
Net cost: $0.00
total cost: $0.00
Tami, would you like to do another calculation (Y or N):
n
Tami, Have a nice day!

You will write a program that will calculate the order tax (tax), the net cost (net Cost), and the total cost totalCost) of a
For program 2 you must we the following functions exactly as described above (same name and some forma parameter data types i

for c++

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more