Question: CODE IN JAVA: Create a file called DiceGameLastNameFirstName. This will be the driver class for Die. In this file, create instances of die that represent

CODE IN JAVA:
Create a file called DiceGameLastNameFirstName. This will be the driver class for Die. In this file, create instances of die that represent the following two dice.
First Die: 20 sides, values 1-20, the primary and secondary colors are your two favorite colors, the color of the numbers is gold
Second Die: 10 sides, values: 00,10,20,30,40,50,60,70,80,90, the primary and secondary colors are your two least favorite colors, the color of the numbers is silver
Next, display all of the attributes of each die. Finally, ask the user if they want to play a game. If the user does want to play a game, have them guess which die will be the first to roll a 10. Take turns rolling each die until one of them rolls a 10, displaying the value of each roll for each die. Once a 10 is rolled, tell the user if they won or lost the game and ask if they want to play again.

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 Programming Questions!