Explore BrainMass

Random Number Generation program in Java

I need help with this:

Exercise 6.30:

Computers are playing an increasing role in education. Write a program that will help an elementary school learn multiplication. Use a Random object to produce two positive one-digit integers. 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 it is correct, display the message "Very good!" and ask another multiplication question. 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 each new question. This method should be called once when the application begins execution and each time the user answers the question correctly.

Solution Preview


Just as in the previous post, I have attached three files:

a) Multiply.Java
b) ...

Solution Summary

The objective of this Java program is to accept two random numbers from the user and then multiply the two numbers. The application is comprehensive and includes comments as well as documentation.