For this lab, start with a prototype of the Math Tutor project from our text; chapter 5 problem 8 on page 298 (294 in 8th edition).

*****Do not Turn in project till after we have reviewed Functions.*****

Once you have this code base, it will need to be refactored in the following way:

1. When code executes Program Title should display.

2. Program should prompt for user (Student) name. (You should use getline(cin,name) for this instead of just cin.)

3. Program will Display a menu for problem type:

1. Addition

2. Subtraction

3. Multiplication

4. Division

5. Quit

  1. Program will prompt for menu choice
  2. Program should prompt for number of problems to present
  3. Program will randomly generate problem of type chosen and display
  4. Prompt user for answer
  5. Check answer
    1. If correct display “Correct”
    2. If incorrect, display “incorrect” and show correct value
  6. Repeat step 6 for number of times user entered in step 5
  7. Calculate grade and display on screen for student to see
    1. Show percentage based on correct answers divided by number of problems
  8. Save value to “report.txt”
  9. Program should return to name prompt.

I will be going over functions during week 6. I would like you to refactor code into functions after the lesson. This will be part 2 of the project

*****Do not Turn in project till after we have reviewed Functions.*****

I will also go over how to append data to an existing file, instead of overwriting. To append a file use ios::app when you open your file. Like this

ofstream outputFile;“demofile.txt”,ios::app);
cout << “Now writing data to the file.n”;

For random number, review pages 128 to 131 in chapter 3. Make sure you are seeding your function.

*****Do not Turn in project till after we have reviewed Functions.*****

Looking for solution of this Assignment?


We deliver quality original papers

Our experts write quality original papers using academic databases.  

Free revisions

We offer our clients multiple free revisions just to ensure you get what you want.

Discounted prices

All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount

100% originality

We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity

On-time delivery

We will deliver your paper on time even on short notice or  short deadline, overnight essay or even an urgent essay