Question: Problem Description: Write a program in java that prompts the user to select one of these Math practices categories(Simple, Medium, Hard). Then promote the user
Problem Description:
Write a program in java that prompts the user to select one of these Math practices categories(Simple, Medium, Hard).
Then promote the user to select one of these arithmetic operation(+, -, /, *, %) that they want to practice.
For Simple selection generate two random integer numbersbetween0 to +10,
for Medium selection generate two double precision numbers between 0.00 to 100.00 and
for Hard selection generate two double precision numbers between 0.00 to 1000.00. Show the problem statement to the user and ask them for the answer then check if their answer is correct or not correct and output the proper output to them.
Here are sample runs of the program(Show all different test cases for all possible selections):Make sure you follow chapter 12 for exception handling. Your code must have a switch/case statement. Number1 could be >= or <= number 2.
Sample 1:
Would you like (Simple, Medium or Hard) problem? Medium
What would like to practice today (+, -. /, *, %)? +
What is the answer to (45.03 + 5.03)? 50.06
Good job your answer is correct!
Sample 2:
Would you like (Simple, Medium or Hard) problem? Simple
What would like to practice today (+, -. /, *, %)? -
What is the answer to (2 - 5)? -3
Good job your answer is correct!
Sample 3:
Would you like (Simple, Medium or Hard) problem? Hard
What would like to practice today (+, -. /, *, %)? *
What is the answer to (589.05 * 258.05)? 28873.07
Your answer is wrong, the correct answer should be 152004.35!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
