Lukket

Roulette Game

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 [url removed, login to view] 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

[url removed, login to view]

-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

[url removed, login to view]

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.

[url removed, login to view]

• 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!!

Færdigheder: Java

Se mere: roulette array java, true results, same game java, red red black, red black with, min range, minimum range, java same game, int i, in the red black, integer problems that equal 36, assignment problems in or, assignment problems, constructor method roulette java, get math, wording, true, track credit, the wheel, s parameters, roulette, repeat, reached, math problems, math game

Om arbejdsgiveren:
( 0 bedømmelser ) rochester, United States

Projekt-ID: #62660

9 freelancere byder i gennemsnit $79 for dette job

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 på 1 dag
(5 bedømmelser)
5.3
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 in 2 dage
(8 bedømmelser)
4.8
harshgupta1

I can do this.

$70 USD på 1 dag
(1 bedømmelse)
2.7
sursudevelop

Can be done.

$70 USD in 2 dage
(3 bedømmelser)
2.5
hida93

Hi there, i can do the project for you

$100 USD in 2 dage
(0 bedømmelser)
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 Mere

$80 USD in 8 dage
(0 bedømmelser)
0.0
tulsidas

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

$60 USD på 1 dag
(0 bedømmelser)
0.0
dwc

Give this project to our team and you will get a perfect solution in less than 24 hours!

$55 USD på 1 dag
(0 bedømmelser)
0.0
fyee

I have the program you want.

$100 USD in 0 dage
(0 bedømmelser)
5.4