Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ PLEASE! Please read ALL the directions carefully. Part 1 is worth 50 points (40 points running the tests and 10 for your program formatting,

C++ PLEASE! Please read ALL the directions carefully.

image text in transcribedimage text in transcribed

Part 1 is worth 50 points (40 points running the tests and 10 for your program formatting, comments, and variable names). You will be developing and testing with an IDE and them uploading the solution to zyBooks/zyLabs. Your program will be reading in from a file and writing out to a file. You need to test your program in the IDE to make sure it is working. Once you have completed your testing you will need to upload the source file for the submit mode tests. Failure to meet the requirements could result in loss of points beyond the 10 for the code formatting, variable names, and so on. You can only run the submit mode tests 20 times (or less). If you find any errors while in submit mode you will have to go back to your IDE and update your program, test to make sure you have fixed the problems, and upload a new version to zyBooks/zyLabs You will have to create input files for your program. You can use a text editor such as Notepad or Notepad++ to create this. There may also be an editor in your IDE that you can use. You can use the TextEdit program on macOS but you will need to change the format to Make Plain Text. You will not be uploading these text files to zyBooks/zyLabs. The submit tests will be using their own files In part 1 you will read in five (5) long long int values that represent today's sales for five stores and then create a bar chart from these The five input values will be read in from a file. You need to read in the file name from cin. You should not have a prompt for the file name Once you have read in the file name you need to open up the file and read in the five input values (the sales for the five stores) You will be outputting a string of X (upper case X) characters where each X represents $1,000 in sales for that store. For each 1,000 in sales you output one X. You do not round up the sales, so sales of $6,000 and sales of $6,999 would both output 6 X characters You will output the sales bar chart to a file named saleschart.txt. You need to use a for loop to create the bar chart. You need to verify that the input values are all numbers that are not negative. If one or more of the values are negative you need to output an error message to cout and end the program. The error message is One or more of the sales values are negative If you get an end of file before you get five input values output to cout the error message: Your input file must contain the sales values for five stores Assume the file we are reading in from is called sales.txt. If the file does not exist or cannot be opened output the following message to cout File "sales.txt" could not be opened

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

More Books

Students also viewed these Databases questions

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago

Question

Question Can a Keogh plan fund be reached by the owners creditors?

Answered: 1 week ago

Question

Question What happens to my plan if I die?

Answered: 1 week ago