Question: Obiectives: Java Methods and Arrays (chapters 6 and 7) Write an application that runs 1,000,000 games of craps and answers the following questions: 1) How

 Obiectives: Java Methods and Arrays (chapters 6 and 7) Write an
application that runs 1,000,000 games of craps and answers the following questions:

Obiectives: Java Methods and Arrays (chapters 6 and 7) Write an application that runs 1,000,000 games of craps and answers the following questions: 1) How many games are won on the first roll, second roll, third roll,..., twentieth roll, and after the 2) How many games are lost on the first roll, second roll, third roll, . twentieth roll, and after the 3) 4) What is the average length of a game of craps? twentieth roll (all games that take more than 20 rolls are considered one group)? twentieth roll (all games that take more than 20 rolls are considered one group)? What are the chances of winning at craps? [Note: You should discover that craps is one of the fairest casino ga mes. What do you suppose this means?] Below is a reproduced copy of the Craps.java from chapter 6: // Craps.java // Craps class simulates the dice game craps. import java.uti1.Random public class Craps // create random number generator for use in method rollDice private static final Random randomNumbers new RandomO // enumeration with constants that represent the game status private enum Status CONTINUE, WON, LOST // constants that represent common rolls of the dice private static final int SNAKE EYES-2; private static final int TREY 3; private static final int SEVEN7; private static final int YO LEVEN 11; private static final int BOX CARS-12 // plays one game of craps public static void main String[ args int myPoint 0; // point if no win or loss on first roll Status gamestatus; // can contain CONTINUE, WON or LOST int sumofoi ce rollDice(); // first roll of the dice // determine game status and nint hased on first roll 1/2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!