| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/10/2006 19:13:50
|
GeeksUnite
Newbie
Joined: 01/29/2006 21:14:52
Messages: 55
Offline
|
Hi,
i was given a homework, and im having problems with it. this is the code i've gotten so far:
if you read the file i attached, you can see there are 3 types of bets: one straight bet and two box bet.
i need help using the if statements and if possible use boolean to make this thing work.
thanks in advance.
| Filename |
asg6.doc |
Download
|
| Description |
|
| Filesize |
6 Kbytes
|
| Downloaded: |
114 time(s) |
This message was edited 2 times. Last update was at 03/10/2006 19:17:16
|
I will slowly work my way up to world domination....I know it's going to take some time, but I have plenty of time on my hands. |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/10/2006 21:12:13
|
destin
Newbie
Joined: 01/07/2006 19:13:04
Messages: 224
Offline
|
What do you need help with specifically? No one here is going to do your homework.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/10/2006 21:29:51
|
GeeksUnite
Newbie
Joined: 01/29/2006 21:14:52
Messages: 55
Offline
|
I know that, however, i need to know if this code is correct
and if it is, how can i add the bet, do i have to do 2 types of return? one saying that the player wins/loses the other one for the money won/lost?
|
I will slowly work my way up to world domination....I know it's going to take some time, but I have plenty of time on my hands. |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/10/2006 22:39:18
|
GeeksUnite
Newbie
Joined: 01/29/2006 21:14:52
Messages: 55
Offline
|
I get this error: "cannot find symbol
symbol : constructor Gambling(int,int)
location: class Gambling
Gambling spaceboy = new Gambling(betType, playerNumber);"
^
i tried and i tried but i dont see what the problem is. maybe u guys have better luck.
|
I will slowly work my way up to world domination....I know it's going to take some time, but I have plenty of time on my hands. |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/10/2006 22:52:43
|
GeeksUnite
Newbie
Joined: 01/29/2006 21:14:52
Messages: 55
Offline
|
I'd would like to know if in a method using an IF statement i can send to other methods.
This message was edited 1 time. Last update was at 03/10/2006 22:52:58
|
I will slowly work my way up to world domination....I know it's going to take some time, but I have plenty of time on my hands. |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/10/2006 23:36:29
|
GeeksUnite
Newbie
Joined: 01/29/2006 21:14:52
Messages: 55
Offline
|
Or maybe this is the solution?
plz tell me if there is a way i can put those two together somehow. because Straight bet gets 600 to 1, while the others get a lower score, so i'll need different methods for them.
This message was edited 1 time. Last update was at 03/10/2006 23:38:27
|
I will slowly work my way up to world domination....I know it's going to take some time, but I have plenty of time on my hands. |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/14/2006 17:43:59
|
GeeksUnite
Newbie
Joined: 01/29/2006 21:14:52
Messages: 55
Offline
|
hello,
i'd like some one to help me create a random number generator of 3 digits min:100 max:999, that will go with my class program.
This message was edited 3 times. Last update was at 03/14/2006 19:12:16
|
I will slowly work my way up to world domination....I know it's going to take some time, but I have plenty of time on my hands. |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/14/2006 18:49:15
|
destin
Newbie
Joined: 01/07/2006 19:13:04
Messages: 224
Offline
|
For random numbers you should look at the java.util.Random class. Experiment with it, then post back if you still need help. Again, no one is going to do this for you.
Here are some useful links relating to generating random numbers:
Java Practices: Generating Random Numbers
Java Random Numbers
Java Programming Notes: Random Numbers
Random Numbers in Java
Good luck!
This message was edited 1 time. Last update was at 03/14/2006 20:11:57
|
|
|
 |
|
|