subject

For this lab you will write a Java program that will run a simple math quiz. Your program will generate two random integers between 1 and 20 and then ask a series of math questions. Each question will be evaluated as to whether it is the right or wrong answer. In the end a final score should be reported for the user. This is a sample transcript of what your program should do. Items in bold are user input and should not be put on the screen by your program.

Enter your name: Jeremy
Welcome Jeremy! Please answer the following questions:

4 + 6 = 10
Correct!

4 * 6 = 24
Correct!

4 / 6 = 1
Wrong!
The correct answer is 0

4 % 6 = 4
Correct!

You got 3 correct answers
That's 75.0%!

Your code will behave differently based on the random numbers it selects and the answers provided by the user. Here is a second possible execution of this code:

Enter your name: Bob
Welcome Bob! Please answer the following questions:

3 + 3 = 0
Wrong!
The correct answer is 6

3 * 3 = 6
Wrong!
The correct answer is 9

3 / 3 = 0
Wrong!
The correct answer is 1

3 % 3 = 1
Wrong!
The correct answer is 0

You got 0 correct answers
That's 0.0%!

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Which cultural aspect does this type of song best portray? a german polka dance
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
question
Computers and Technology, 24.06.2019 17:50
Acontact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. write a program that first takes in word pairs that consist of a name and a phone number (both strings). that list is followed by a name, and your program should output that name's phone number.
Answers: 1
You know the right answer?
For this lab you will write a Java program that will run a simple math quiz. Your program will gener...
Questions
question
Biology, 13.05.2021 06:10
question
Chemistry, 13.05.2021 06:10
question
Mathematics, 13.05.2021 06:10
Questions on the website: 13722367