Question: c++ the program should print out a list that says: Please chose from the the list: 1. Enter sales. 2. Total sales for the day.

c++

the program should print out a list that says:

Please chose from the the list: 1. Enter sales. 2. Total sales for the day.

Your program should get the users input, and then check to see if it is a valid choice. You may assume that the user enters in a numerical value. You may not assume the number is valid. If it is not, force the user to enter the choice again. Do this repeatedly until the user selects a valid choice.

USER SELECTS CHOICE 1 If the user selects to enter sales (CHOICE 1), then you first need to print out a message to the screen that confirms that they chose to enter sales. Then you need to open the output file in append mode like this:

filename.open(sales.txt, ios::app)

Then you display another menu that says:

Choose the department from the following menu: 1. Comics 2. Collectibles 3. Games

Get the users choice and again validate the choice like you did in the main menu. If the user selected Comics, output Comics to sales.txt. If the user selected Collectibles, output Collectibles to sales.txt. If the user selected Games, output Games to sales.txt.

Then, no matter what they chose, ask the user for the price of the item and how many of the item they purchased. Multiply the cost of the item times the quantity to get the total cost. Then add in tax. You should define TAX as a constant in your program as 6% (.06). Then output the total cost with tax to sales.txt Make sure that after you output the total cost with tax to put a at the end. Also, this value should only have two numbers after the decimal point.

Then, ask the user if they want to enter more sales. If they do, then repeat the department menu and the steps necessary to enter another sale.

Once the user is done entering sales, display the main menu again.

This is an example of what the sales.txt could look like:

c++ the program should print out a list that says: Please chose

Sales Tulepou File Edit Format View Comics Help 5.25 Collectibles 10.60 Games 127.20 Comics 10.60

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!