Teen Programmers Unite  
 

 

Return to forum top

java problem challenge

Posted by motlaks [send private reply] at March 14, 2002, 10:11:53 AM

I AM CHALLENGING ALL THE GENIUSES TO TACKLE THE QUESTION BELOW AS MOST OF THE PEOPLE,INCLUDING MY LECTURE,HAVE FAILED TO GET THE PROBLEM RUNNING WELL.IT'S AS FOLLOWS;

Write a program that helps an elementary student learn multiplication.Use two positive one-digit integer which are randomly generated.Your program should then type a question such as;
How much is 6 times 7?

The student then types the answer.Your program checks the student's answer.If it is correct,print"very good!".And then ask another question.If the answer is wrong,print"No.Please try again."And then let the student try the same question repeatedly until the student finally gets it right.

I HOPE MY PLEA WILL BE ANSWERED

Posted by metamorphic [send private reply] at March 14, 2002, 10:32:52 AM

I dont know Java, but if your lecturer does know java i see no reason why he could not write the program. C++ and java are supposed to be slighty similar, now i could write that program in C++ no prob.

step 1: Generate 2 random numbers that are less say 11 and more than 0 and have a bool type variable that holds wheather the user wants to quit and another that holds if the user got the Q right

step 2: set up a loop that keeps going until the user wants to quit.

step 3: set another loop inside that keeps going until the user gets a Q right or wants to quit

step 4: use the random number function from earlier to create a multiplication problem and get the users answer

step 5: if the user got it right then the loop starts again, otherwise the Q gets asked again

Step 6: the outside loop does the rest.

ok?

Posted by Psion [send private reply] at March 14, 2002, 01:02:27 PM

This is ridiculous. Ask your teacher how to do this problem if you do not know.

Posted by CodeRed [send private reply] at March 14, 2002, 01:52:07 PM

This question hardly requires a genius. By the way, I wrote a response to your other thread to help you do this but SOMEONE deleted it.

Posted by gian [send private reply] at March 14, 2002, 02:04:02 PM

What? That is like the simplest thing since a loaf of bread! I think that motlaks was trying to get us to help with his homework by disguising it as a challenge.

Posted by Psion [send private reply] at March 14, 2002, 02:14:03 PM

CodeRed, I deleted it because the policy for this forum (and this whole site) is as much against ANSWERING direct requests for homework answers as it is against posting them, and you should have known better, while new visitors might not.

Posted by CodeRed [send private reply] at March 14, 2002, 02:17:58 PM

I didn't answer the question directly Psion I wrote maybe four code snippets for him that he probably knew already

Posted by taubz [send private reply] at March 14, 2002, 10:23:43 PM

Then you admit your post was useless!

Posted by CodeRed [send private reply] at March 14, 2002, 10:57:36 PM

Whatever. "MOST OF THE PEOPLE,INCLUDING MY LECTURE,HAVE FAILED TO GET THE PROBLEM RUNNING" Is he saying that his teacher could not figure this out? Gotta love public school. My highschool had a math teacher doing the programming courses, she knew the basics up to creating classes.

Posted by chris [send private reply] at March 15, 2002, 09:17:16 PM

Your Lucky my High School does not have a programming course.The only thing we have is Typing, Intro into computers (How to turn a computer ON), Computer applications(Study of Software), and Adv. Computer applications(Windows 98 "HAHA", visual basic (They could not spell Visual Basic).There is my problem. One more thing
our teacher have no clue what they are teaching. I have been on a few occations been asked to fix a computer problem becouse the teacher that took special "Computer Teaching Technology Courses" don't have a clue what the problem is.

Making fun of his own School
Chris Stelmarski

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.