How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask LogicPro Your Own Question

LogicPro, Engineer
Category: Homework
Satisfied Customers: 12366
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
Type Your Homework Question Here...
LogicPro is online now
A new question is answered every 9 seconds

1) Develop a Java applet that will help an elementary school

This answer was rated:

1) Develop a Java applet that will help an elementary school student learn multiplication. Use the Math.random method or a Random object to produce two positive one-digit integers. The program should then display a question, such as:

How much is 6 times 7?

This question can be posted anywhere on the applet window you want. You can easily have it go to the status line at the bottom via the showStatus method.

The student they types the answer into a JTextField. Next the program checks the student's answer. If the answer is correct, draw the string "Very good!" on the applet and ask another multiplication question. If the answer is wrong, draw the string "No. Please try again." on the applet 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 applet begins execution and each time the user answers the question correctly. All drawing on the applet should be performed by the paint method (usually indirectly through the repaint method).

Three scenarios are required! You must run your application for three different successive multiplication results. On the first problem, make two deliberate mistakes before providing the correct result. Then on the second problem, make one deliberate mistake before providing the correct result. Finally on the third problem provide the correct result on the first try. Note that zero is not a positive number.

You must show all of the program's prompts for input, all of the actual user's inputs, and all of the program's responses to all user's inputs. Do not just show a sample of the program/user interaction.

(This program was taken from Exercise 6.31 on pages 274-275 of Deitel & Deitel's "Java How to Program (Fifth Edition)" (2003 by Pearson Publishing Co.))

Here is the pseudocode for one possible solution to this program:

public class P6_....
set up a JLabel and a JTextField
set up int variables for 2 numbers
set up boolean variables for the initial question being
answered and the correct answer input
set up a message variable of String datatype
set up a Container and layout for FlowLayout
output the user notification on what to do
set up a character response field for the JTextField, add it to the container, and set up an ActionListener on it
call the class's parent via super.paint( g ) if the initial question hasn't been asked yet, then do so via newQuestion() and set the initial question boolean variable to false
if the initial question has been answered then see if the correct answer was given; if so output "Very good!", call newQuestion(), and set the correct answer boolean to false; if not the output "No. Please try again"
clear the JTextBox for a new user input
actionPerformed( ActionEvent event )
if the correct answer was input then set the correct response boolean variable true; if not set it false
call repaint() to display the correct output message to the user
set up 2 random inter values and ask the user what their product is


2) You may use the Windows Command Prompt command line interface or any Java IDE you choose to compile and execute your program.

3) You are to submit the following deliverables to the Assignment Link in a single Microsoft Word file:

a) A screen snapshot of your Java source code (just the beginning is OK) as it appears in your IDE (e.g. Net Beans, Eclipse, etc.) or editor (e.g. a Windows Command Prompt DOS "more" of the .java file's first screen).

b) A listing of your entire Java source code in the same Microsoft Word file as item a), and following item a). You can simply copy and paste the text from your IDE into Word. Be sure to maintain proper code alignment by using Courier font for this item.

c) A screen snapshot of your program’s execution output in the same Microsoft Word file, and following item b). All user's inputs and program outputs must be shown for your three successive scenarios. Do not just include a sample of the interaction.

4) Your instructor may compile and run your program to verify that it compiles and executes properly.

5) You will be evaluated on (in order of importance):
a) Inclusion of all deliverables in Step #3.
b) Correct execution of your program.
c) Adequate commenting of your code.
d) Good programming style (as specified in the textbook's examples).
e) Neatness in packaging and labeling of your deliverables.

Deficiencies in any of the above areas are subject to up to a 2 (two) point deduction, per area, based on the severity of the deficiency.

6) Programs received after the due date/time will receive a score of zero since there are already 15 extra points
My name is XXXXX XXXXX I will help you.

If you have any file(s), Zip all files, upload the zipped file to and post download link here.
What is the deadline?
Customer: replied 3 years ago.

deadline midnight CST 21 July 2013

Customer: replied 3 years ago.

Thank you.
I will review and reply ASAP
Customer: replied 3 years ago.


Customer: replied 3 years ago.

Did you forget about me?


You need to spend $3 to view this post. Add Funds to your account and buy credits.
LogicPro and 11 other Homework Specialists are ready to help you

Related Homework Questions