C++ programming

C++ programming

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;
outputFile.open(“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.*****

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper