Write an application that runs 1,000,000 games of craps (Fig. 5.8) and answers the following questions: a)

Question:

Write an application that runs 1,000,000 games of craps (Fig. 5.8) and answers the following questions:

a) How many games are won on the first roll, second roll, …, twentieth roll and after the twentieth roll?

b) How many games are lost on the first roll, second roll, …, twentieth roll and after the twentieth roll?

c) What are the chances of winning at craps?

d) What is the average length of a game of craps?

e) Do the chances of winning improve with the length of the game?

Fig. 5.8

I 2 3 import java.security.SecureRandom; 4 5 6 7 8 9 10 II 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: