Results 1 to 14 of 14
Thread: I Need help
- 10-05-2008, 05:17 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 10
- Rep Power
- 0
- 10-05-2008, 05:22 PM #2
Yes we can help, we get plenty of this from today's coder. What books are you reading? Do you want to learn something or just get by a class instruction? I can help either way, but first: Do you know what a random number is?
newbies, oh the fun!Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
- 10-05-2008, 05:24 PM #3
Member
- Join Date
- Oct 2008
- Posts
- 10
- Rep Power
- 0
yes it gives a random number w/out knowing what number will appear
can you show the codes for that problem? so i can try it and simulate in my pc
- 10-05-2008, 05:25 PM #4
Member
- Join Date
- Oct 2008
- Posts
- 10
- Rep Power
- 0
actually i am studying java for only a month a college student. and we have this project . a
- 10-05-2008, 05:30 PM #5
Senior Member
- Join Date
- Aug 2008
- Location
- Stockholm, Sweden
- Posts
- 119
- Rep Power
- 0
"Just one month". After my first month we had already covered inheritance, polymorphism, swing, file i/o etc. I promise you you have covered this in your classes.
The first thing you should to is check Java's API. You want to create a random number? What do you think Sun have named the class that handles just that? Also Google is a tip.
And when you have a concrete question about your code to ask, you're welcome to post again.
- 10-05-2008, 05:34 PM #6
Break the program up into small steps:
First generate a random number
Write a test program that does only this. Use println() to display the results.
Next ask user to guess
Write another test program that only does this.
Get user response
Same as above.
After you have done the above come back with your questions on how to continue.
Good luck.
- 10-05-2008, 05:37 PM #7
Member
- Join Date
- Oct 2008
- Posts
- 10
- Rep Power
- 0
i really dont get it T_T
can help me on what code should I put ?
- 10-05-2008, 05:40 PM #8
Senior Member
- Join Date
- Aug 2008
- Location
- Stockholm, Sweden
- Posts
- 119
- Rep Power
- 0
No, no one is going to do your homework for you. That does not help you, no matter how hard you want to think it will. Read my last post again.
- 10-05-2008, 05:43 PM #9
Member
- Join Date
- Oct 2008
- Posts
- 10
- Rep Power
- 0
im not asking you to make my homework
im just asking what code will i put
- 10-05-2008, 05:54 PM #10
Member
- Join Date
- Oct 2008
- Posts
- 10
- Rep Power
- 0
btw thank you for the time that you spent replying in this thread
im just hoping that someone can give the codes to me T_T thank you in advance T_T
signing off
- 10-05-2008, 06:03 PM #11
Senior Member
- Join Date
- Aug 2008
- Location
- Stockholm, Sweden
- Posts
- 119
- Rep Power
- 0
- 10-05-2008, 06:24 PM #12
Ok, we'll get you started:
Java Code:public class MyClass { public static void main(String[] args) { System.out.println("Starting main"): //.... put YOUR logic here } // end main // Put needed methods here } // end class
- 10-05-2008, 06:56 PM #13
Senior Member
- Join Date
- Aug 2008
- Posts
- 384
- Rep Power
- 5
Covered inheritance & polymorphism? What's that, lol. ;)
Because I'm in a good mood I'll help you, a little.
java.lang.Math.random() generates a random number between 0 and 1. Math.random() < 1I die a little on the inside...
Every time I get shot.
- 10-05-2008, 07:23 PM #14
print( some code )
Basically you have to write some code, that is what the other posters are trying to say. If that is hard, just write some code - eventually the solution, as that may be, appears on the screen as though you had actually done some thinking. At that point, the other's harping will sound like music, which you can probably use given your displayed name.
Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks