Roulette Game

Cerrado Publicado May 21, 2006 Pagado a la entrega
Cerrado Pagado a la entrega

Java assignment that I am totally stumped on- It is due by Thursday- I am sure this could be done easily

First, the user is prompted for how many spins of the wheel that will be bet on. The application should use the [login to view URL] method as the basis for computing the number that would be spun on the wheel. It should then compare this number to the various bets and keeps track of how many times each bet would have one. This is continued until the number of spins have been reached.

3 classes

[login to view URL]

-two attributes, the min # that can be generated and the max# that can be generated

- a constructor with two method parameters which are the min number and the max number, both are int. Verify's that the min is >= 0 and that the max is > the min. If not default values of 1 and the min+10 will be used for the min and max.

-an axxessor method for each attribute

-a mutator method for each attribute. the mutator for the minimum will return a boolean value of true if the value of the method parameter is greater than or equal to 0, otherwise returns false. same for the mutator for the max number

-public method named spinWheel with no method parameters that returns a randomly generated integer within the range defined by the values of the attrubites for the min and max values

[login to view URL]

A non-default constructor method accepts an integer parameter for the number of spins.

• You can use either 3 one-dimensional arrays (one for each column) or 1 two-

dimensional array to represent the table. Make sure you account for how to keep track

of the 0. You must have a loop to initialize the array(s) with zeroes, representing that

each spot on the table starts with a value of 0. This array(s) will be used to keep track of

how many times each number was selected. You may want to create duplicate arrays

of whichever one you choose to keep track of the number at that location to make keep

track of the results easier.

• You need another 1 or 2 arrays to keep track of red/black numbers. You don’t need a

loop to initialize the array(s) but can initialize when you instantiate them.

• Create a method that will spin the wheel the number of times stored in the attribute

storing the number of spins. This method will call the method described next to store the

results of each spin.

• Create a private method that will keep count of the number of times each number has

been selected by a spin of the wheel. This method accepts the number that was spun.

• Create a method that examines(traverses) the array(s) representing the table to

calculate and return the results of the spins in an array with the results of each individual

number (0 to 36) expressed as a fraction of the number of spins (ie. take the number of

times a number was spun and divide that by the total number of spins and put that result

in the array that is returned by the method).

• Define accessors and mutators as needed in the program.

• Define any additional methods as needed.

[login to view URL]

• Prompt the user for the number of spins of the wheel.

• Create the table (only the first time through, after that use the mutator(s) to change the

total number of spins and initialize the results to zero), spin the wheel that number of

times and print the results of each type of bet by calling the appropriate two methods of

the RouletteTable class object (the one to spin and the one to get the results). Only

display the results for a particular number (or other bet if doing extra credit) if that result

is > 0.

• You will repeat this process until the user enters any value less than 1.

Where I am having problems is the RouletteTable.java.. maybe it is just the wording but I am so confused with the Arrays!!

Any Help would be soooo appreciated!!

Java

Nº del proyecto: #62660

Sobre el proyecto

8 propuestas Proyecto remoto Activo Nov 26, 2006

8 freelancers están ofertando un promedio de $82 por este trabajo

danmoliver

Hi Sosgal, I'm Dan and I'm a Sun Certified Java Programmer with over 7 years experience in Java. See private message for more.

$75 USD en 2 días
(9 comentarios)
5.0
sonalgoyal

Hi, I have more than 8 years of Java programming experience and can help you. I will send you complete code with instructions. The code will be well documented for you to undertsand it. Regards, Sonal

$100 USD en 1 día
(5 comentarios)
5.3
harshgupta1

I can do this.

$70 USD en 1 día
(1 comentario)
2.7
sursudevelop

Can be done.

$70 USD en 2 días
(3 comentarios)
2.5
hida93

Hi there, i can do the project for you

$100 USD en 2 días
(0 comentarios)
0.0
instance

GOOD QUALITY WORK WITH INTIME DELIVERY OF THE PRODUCT . 100% GUARANTEED OF HIGH QUALITY PROFESSIONAL WORK, AS WE ARE THE EXPERTISE IN JAVA/J2EE , JSP , EJB, ASP,PHP, STRUTS FRAME WORK RELATED PROJECTS. OUR COMPANY HAS Más

$80 USD en 8 días
(0 comentarios)
0.0
tulsidas

8 years of java expertise, will do this in one single day.

$60 USD en 1 día
(0 comentarios)
0.0
fyee

I have the program you want.

$100 USD en 0 días
(0 comentarios)
5.4