Computers and Technology, 05.06.2020 04:57 giordanolucia18
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%!
Answers: 3
Computers and Technology, 22.06.2019 11:30
One subtask in the game is to roll the dice. explain why is roll the dice an abstraction.
Answers: 3
Computers and Technology, 22.06.2019 17:00
The two main ways in which marketers address the competition with their strategies are by satisfying a need better than a competition and by
Answers: 2
Computers and Technology, 22.06.2019 19:20
Amedian in the road will be marked with a white sign that has a black arrow going to the left of the median. true false
Answers: 1
Computers and Technology, 23.06.2019 07:50
Most shops require the technician to enter a starting and ending time on the repair order to track the actual time the vehicle was in the shop and closed out by the office. this time is referred to as _ time ? a. comeback b. ro c. cycle d. lead
Answers: 1
For this lab you will write a Java program that will run a simple math quiz. Your program will gener...
Biology, 12.02.2021 09:30
Mathematics, 12.02.2021 09:30
Mathematics, 12.02.2021 09:30
Mathematics, 12.02.2021 09:30
Mathematics, 12.02.2021 09:30
Mathematics, 12.02.2021 09:30
Mathematics, 12.02.2021 09:30
Mathematics, 12.02.2021 09:30
Mathematics, 12.02.2021 09:30
English, 12.02.2021 09:30