Complete the playCraps() method which is found in the Java class called Craps (in a file named Craps.java), which is provided for you.

Words: 222
Pages: 1
Subject: Uncategorized

Use classes, branches, simple while loops, arithmetic, output.Complete the code provided so that it plays 10000 games of craps. In the game of craps, two six- sided dice are rolled. A roll of 7 or 11 automatically wins, and a roll of 2, 3, or 12 automatically loses. If any other number is rolled, that number becomes the point. The player keeps rolling the dice until either 7 or the point is rolled. If the point is rolled, the player wins, but if 7 is rolled, the player loses.1. Complete the playCraps() method which is found in the Java class called Craps (in a file named Craps.java), which is provided for you.2. Modify the main method in HW2 to:play 10000 games,count how many times the player wins and loses.output the wins and losses and the probability of winning (wins / (wins + losses)).label and format the output neatly, showing the probability as a percentage.

Let Us write for you! We offer custom paper writing services Order Now.

REVIEWS


Criminology Order #: 564575

“ This is exactly what I needed . Thank you so much.”

Joanna David.


Communications and Media Order #: 564566
"Great job, completed quicker than expected. Thank you very much!"

Peggy Smith.

Art Order #: 563708
Thanks a million to the great team.

Harrison James.


"Very efficient definitely recommend this site for help getting your assignments to help"

Hannah Seven