ASSIGNMENT       

 

 

 

EX 1.

 

Computers are playing an increasing role in education. Write an applet that will help an elementary school student learn multiplication. Use Math.random to produce two one-digit integers. It should then display a question in the status bar such as

 

 How much is 6 times 7?

 

The student then types the answer into a JTextfield . Your program checks the student’s answer. If it is correct, draw the string Very good!” on the applet, then ask another multiplication question. If the answer is wrong, draw the string “No. Please try again.” on the applet, then let the student try the same question again 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 applet begins execution and each time the user answers the question correctly.

 

Program outline