Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java: Please follow requirements: The program shall generate random numbers with a SecureRandom object The program shall ask the student to solve a multiplication

Using Java:

image text in transcribed

Please follow requirements:

  • The program shall generate random numbers with a SecureRandom object
  • The program shall ask the student to solve a multiplication problem
  • A multiplication problem shall contain two numbers sampled from a uniform random distribution in the range of 0 to 9 (inclusive)
  • The program shall display the message "Very good!" if the student provides a correct response
  • The program shall display the message "No. Please try again." if the student provides an incorrect response
  • The program shall terminate when a correct response is provided by the student
  • The program shall continue to ask the student to solve the original multiplication problem until the student provides the correct answer
  • Create a method called "quiz" that contains the program logic
  • Create a method called "askQuestion" that prints the problem to the screen
  • Create a method called "readResponse" that reads the answer from the student
  • Create a method called "isAnswerCorrect" that checks to see if the student's answer matches the correct answer to the problem
  • Create a method called "displayCorrectResponse" that prints out the response when a student enters a correct answer
  • Create a method called "displayIncorrectResponse" that prints out the response when a student enters an incorrect answer
  • Create a main method that runs your program by calling the "quiz" method
Part 1 The use of computers in education is referred to as computer-assisted instruction (CAI). Write a program that will help an elementary school student learn multiplication. Use a SecureRandom object to produce two positive one-digit integers (you will need to look up how to do this). The program should then prompt the user with a question, such as How much is 6 times 7? The student then inputs the answer. Next, the program checks the student's answer. If it's correct, display the message "very good!" and terminate the program. If the answer is wrong, display the message "No. Please try again." and let the student try the same question repeatedly until the student finally gets it right. A separate method should be used to generate the

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions