Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(IN JAVA) The use of computers in education is referred to as computer-assisted instruction (CAI) . Write a program that will help an elementary school

(IN JAVA) 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 students answer. If its 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 question.

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 "isAsnwerCorrect" 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 "displayInorrectResponse" 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

As you are going through this it would be amazing if you could leave comments as I am trying to learn the way to formulate the pseudocode behind the program.

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

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions

Question

3. Describe the strategic training and development process.

Answered: 1 week ago

Question

10. Microsoft Corporation

Answered: 1 week ago