Question: Let's play 2 1 ! ! ! ( using dice ) Write a program that allows the users to play the computer. The goal is
Let's play using dice
Write a program that allows the users to play the computer. The goal is for the user to get to without going over and beat whatever value the computer will randomly generate.
There should be several iterations for each round that repeats as long as the users says yes and the total for the rolls does not exceed
Ask the user at the beginning if they want to roll the dice to accumulate points.
During the round, the program mimics the rolling of two sixsided dice. The computer rolls the dice first, then the user is asked if they wish to roll. Create a die class
Keep a running total of the user's and the computer points
Do not show the computer's total until the loop ends.
At the end show both the computer's total and the user's total to reveal the winner without going over c
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
