Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write all in 1java run 1) Generate two random numbers between 2 and 10. 2) Ask user to choose one operator from +,,,/ ( note:
Write all in 1java run
1) Generate two random numbers between 2 and 10. 2) Ask user to choose one operator from +,,,/ ( note: / is an integer division) 3) Display Math formula using the numbers and the operator. ( eg: 67= ?) 4) Ask the user for an answer. - If the user's answer is correct, display "You are a math genius! Bye." and terminate the program. - If the user's answer is incorrect. Display "wrong answer!" and ask the user for the answer of the formular again. (Do not generate new numbers and formula.) 5) To calculate the answer, create a method and send/return the operator and two numbers. Like, public static int math(String op, int a, int b) \{ int result =0; if (op.equals(" + ") { result =;} return result; \} 6) you must pass 3 parameters (operator, first number, second number) to the math method and receive the result from the method. 7) Include appropriate program comments and formatting including: Your first and last name, a short description of the program's function comments necessary to explain the operation of your programStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started