Question: Chapter 4 - Mathtutor Instructions Write a program that can be used as a mathtutor for a young student. The program should display two random
Chapter 4 - Mathtutor
Instructions
Write a program that can be used as a mathtutor for a young student. The program should display two random numbers (10 pts) to be added, subtracted, multiplied or divided.
Provide a menu where the user decides the operation for example: (10 pts)
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Quit
Then provide a question for the user to answer similar to the following: (10 pts)
240 + 50 =
The program should then allow the student user to enter their answer. If the student is correct, they will get a congratulatory message. If the student answers incorrectly, the program will display the correct solution with an encouraging message. (30 pts)
The final selection on the menu should let the user quit the program. (5 pts)
After the user has finished the math problem, the program should display the menu again. (10 pts)
This process is repeated until the user chooses to quit the program. (5 pts)
Input Validation: If the user selects an item not on the menu, display an error message and display the menu again. (5 pts)
Create a class named QuizStudent to demonstrate the Mathtutor program. (I will show you an example of this in the class video)
Sample Output Sample Input
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Quit
Please choose your operation or press 5 to Quit: 1
250 + 50 = 299
Sorry, the answer is 300, please try again!
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Quit
Please choose your operation or press 5 to Quit: 5
Thank you!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
