[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
Gambling  XML
Forum Index » Java Programming
Author Message
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 [Disk] 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.
destin

Newbie
[Avatar]
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.
[Email]
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.
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.
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.
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.
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.
destin

Newbie
[Avatar]
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

[Email]
 
Forum Index » Java Programming
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle