Question: Create a class called DiceSim.java which simulates the rolling of five six-sided dice 777 times and reports the number of Yahtzees (five of a kind)

Create a class called DiceSim.java which simulates the rolling of five six-sided dice 777 times and reports the number of Yahtzees (five of a kind) rolled. Use a random generator and make sure you don't roll any 0's or 7's. Your code should print each roll and conclude with the yahtzee count like so:

22356

62143

36621

43552

66455

16222

61421

The Yahtzee count is: 4

(The above is showing the last 7 rolls and the yahtzee count but you will print all rolls and the yahtzee count)

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