Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You are to write a simulation of the Craps dice game. Read the requirements care

ID: 3862074 • Letter: Y

Question

You are to write a simulation of the Craps dice game. Read the requirements carefully, as I expect you to implement these requirements, and you will lose points for non-compliance. After you start coding, re read the requirements to make sure you haven't neglected anything. Post any question on Pizza. Use the following rules: First roll (the "come-out roll") wins if the total is a 7 or 11. First roll loses if the total is a 2, 3, or 12 (craps"). If any of these five numbers is rolled on the first roll, tally the win or loss, and the round is over. If none of the above is rolled on a first roll, then the value rolled is saved away (i.e., a "point" is established). You continue rolling the dice until either a 7 or the point is rolled. If the point is rolled before a 7, tally a win; if a 7 is rolled before the point, tally a loss. Then the round is over. You'll keep track of the wins and losses for all rounds played. You should print rounds exactly as shown on the next page. You should run 100,000 rounds, but only print the above details for the first 10 rounds. After all 100,000 rounds have run, print out the grand total of wins and losses. You'll use the Die class to simulate the roll of a die. You will want to use the method twice, to simulate the rolling of two dice. You'll probably have two loops: one for the rounds, and one when you're trying to make the point. (You will use either a flag or logical expression to terminate the inner while loop.) You will want to enclose the detailed print statements in a conditional (if) statement, and only print the details if the round

Explanation / Answer

Answer:

Since you haven't posted the way the ouput is supposed to be formatted, I'll be printing the output in an assumed format. Please go through the code and check the System.out.println statments, and change the format according to your requirements. Or you can comment on my answer and I'll post the updated code accordingly.

PROGRAM:

------------------------------------------------------------------------------------------------------------------------------------------

OUTPUT:

Round - 1
Roll The Dices
Total Score: 3
You Lose

Round - 2
Roll The Dices
Total Score: 7
You Win

Round - 3
Roll The Dices
Total Score: 4
Point: 4
New Score:8
New Score:6
New Score:8
New Score:6
New Score:7
You Lose
Round 3 Ends


Round - 4
Roll The Dices
Total Score: 5
Point: 5
New Score:6
New Score:8
New Score:2
New Score:8
New Score:6
New Score:2
New Score:8
New Score:8
New Score:7
You Lose
Round 4 Ends


Round - 5
Roll The Dices
Total Score: 7
You Win

Round - 6
Roll The Dices
Total Score: 4
Point: 4
New Score:5
New Score:10
New Score:6
New Score:5
New Score:6
New Score:6
New Score:7
You Lose
Round 6 Ends


Round - 7
Roll The Dices
Total Score: 7
You Win

Round - 8
Roll The Dices
Total Score: 6
Point: 6
New Score:4
New Score:4
New Score:2
New Score:6
You Win
Round 8 Ends


Round - 9
Roll The Dices
Total Score: 3
You Lose

Round - 10
Roll The Dices
Total Score: 8
Point: 8
New Score:5
New Score:9
New Score:2
New Score:6
New Score:9
New Score:5
New Score:6
New Score:6
New Score:9
New Score:9
New Score:5
New Score:7
You Lose
Round 10 Ends


Result at the end of 100000 Rounds:
Number of Wins:48652
Number of Losses:51348

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote