Question: Write in C + + please : Project Description Create a program that calculates the all items total, the discount amount, the subtotal, the sales
Write in C please : Project Description
Create a program that calculates the all items total, the discount amount, the subtotal, the sales tax amount, and the grand total for the department store. The program asks the sales associate to enter the cost of an item repeatedly until she or he enters zero to terminate the data entries. The associate should enter the current sales tax rate and the promotion code for the customer as well.
Sample Run
Department Store Sales Tax and Grand Total Application
Data Entries: Enter to end your inputCost of item: Cost of item: Cost of item: Cost of item: All items total: $
Promotion code: Discount amount: $Subtotal: $
Sales tax rate : Sales tax amount: $
Grand total: $
Continue? yYnN: y
Data Entries: Enter to end your inputCost of item: Cost of item: Cost of item: Cost of item: Cost of item: All items total: $
Promotion code: Discount amount: $Subtotal: $
Sales tax rate : Tax rate should be from to Sales tax rate : Sales tax amount: $
Grand total: $
Continue? yYnN: y
Data Entries: Enter to end your inputCost of item: Cost of item: All items total: $
Promotion code: Invalid promotion code. Try againPromotion code: Discount amount: $Subtotal: $
Sales tax rate : Sales tax amount: $
Grand total: $
Continue? yYnN: Y
Data Entries: Enter to end your inputCost of item: Cost of item: Cost of item: All items total: $
Sales tax rate :
Discount amount: $Subtotal: $Sales tax amount: $Grand total: $
Continue? yYnN: N
Program is terminated
Specifications
The sales tax rate is from to
The system accepts only the following promotion codes for a discount amount:
$ discount
$ discount
$ discount
no discount
If the all items total is $ or more, the discount amount is of the total. No other discounts are applied.
The subtotal, the sales tax amount, and the grand total are calculated as follows:
subtotal all items total discount amount
sales tax amount subtotal sales tax rate
grand total subtotal sales tax amount
Your project source file should contain the following functions:
int main
void displaytitle: Displays the title of the application.
double getallitemstotal: Gets all the costs of items and returns the total.
double getdiscountdouble total: Returns a discount amount which is based on the total. It could be $ $ $ $ or if the total is $ or more.
double getsalestaxdouble subtotal: Returns the sales tax amount which is based on the subtotal.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
