Computers and Technology

For this project 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. (See below for how to generate random numbers).Following the instructions from Closed Lab 01, create a new folder named FunWithBranching and a new Java program in that folder named FunWithBranching. java for this assignment. Sample Ouptut This is a sample transcript of what your program should do. Values in the transcript in BOLD show the user inputs. So in this transcript the user inputs 33, Jeremy, 24, -16, 80 and 0 - the rest is output from the program. Enter a random number seed: 33Enter your name: JeremyHello Jeremy!Please answer the following questions:4 + 20 = 24Correct!4 - 20 = -16Correct!4 * 20 = 80Correct!4 / 20 = 0Correct!4 % 20 = 4Correct!You got 5 correct answers!That's 100.0%!Your code will behave differently based on the random number seed you use and the answers provided by the user. Here is a second possible execution of this code. As before, values in BOLD are provided by the user - in this case 54, Bob, 8, 32, 8 and 1 - the rest is the output of the program when you run it. Enter a random number seed: 54Enter your name: BobHello Bob!Please answer the following questions:20 + 12 = 8Wrong!The correct answer is: 3220 - 12 = 32Wrong!The correct answer is: 820 * 12 = 8Wrong!The correct answer is: 24020 / 12 = 1Correct!20 % 12 = 8Correct!You got 2 correct answers!That's 40.0%!

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:30, sayedaly2096
What type of file does a cookie place on web site visitors' computers so that web site managers can customize their sites to their visitors' preferences?
Answers: 1
image
Computers and Technology, 23.06.2019 13:00, jaelynnm
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
image
Computers and Technology, 23.06.2019 16:30, jessisjawsome
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
image
Computers and Technology, 24.06.2019 16:00, alexisbeasley2
Which of the following characters is acceptable to use in a filename? ? / – %
Answers: 1
Do you know the correct answer?
For this project you will write a Java program that will run a simple math quiz. Your program will g...

Questions in other subjects:

Konu
Biology, 12.04.2021 06:30
Konu
Mathematics, 12.04.2021 06:30