subject

You will create a class called DiceArray. java which simulates the rolling of five six-sided dice 7,776 times and reports the number of Yahtzees (five of a kind) rolled. You will populate the array with a random number between 1 and 6, just like a set of dice. You will compare each index to see if you get five of the same number and keep tally of these Yahtzees. You will print each set of five "rolls" and after the final roll display how many Yahtzees occoured. A sample output could look like this(note this this shows the last four rolls but all rolls should print)

24132

41322

11234

12344

3 total Yahtzees after 7,776 rolls.

Part2:

Now build a 2-dimensional array that is 5x5 and populate it with random rolls like you did above. Once you’ve populated the 2-D array I want you to print the 2-D array to the output screen then print how many Yahtzees exist in each row, how many Yahtzees exist in each column and how many Yahtzees exist on the diagonals. A sample output could look like this

45631

52411

65121

41351

15321

There are 0 row Yahtzees

There are 1 column Yahtzees

There are 1 diagonal Yahtzees

Both part 1 and part 2 should reside in the same program

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
Digital information is stored using a series of ones and zeros. computers are digital machines because they can only read information as on or off –1 or 0. this method of computation is known as the system
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Read this excerpt from helen keller’s autobiography, the story of my life. have you ever been at sea in a dense fog, when it seemed as if a tangible white darkness shut you in, and the great ship, tense and anxious, groped her way toward the shore with plummet and sounding-line, and you waited with beating heart for something to happen? i was like that ship before my education began, only i was without compass or sounding-line, and had no way of knowing how near the harbour was. "light! give me light! " was the wordless cry of my soul, and the light of love shone on me in that very hour. . the morning after my teacher came she led me into her room and gave me a doll. the little blind children at the perkins institution had sent it and laura bridgman had dressed it; but i did not know this until afterward. when i had played with it a little while, miss sullivan slowly spelled into my hand the word "d-o-l-l." i was at once interested in this finger play and tried to imitate it. when i finally succeeded in making the letters correctly i was flushed with childish pleasure and pride. running downstairs to my mother i held up my hand and made the letters for doll. i did not know that i was spelling a word or even that words existed; i was simply making my fingers go in monkey-like imitation. in the days that followed i learned to spell in this uncomprehending way a great many words, among them pin, hat, cup and a few verbs like sit, stand and walk. based on this excerpt, which words best describe helen keller?
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Based on the current economic situation do you expect the employment demand for graduating engineers to increase or decrease? explain the basis for your answer. with a significant economic recovery, what do you think will happen to future enrollments in graduating engineering programs?
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
Your is an example of personal information that you should keep private.
Answers: 2
You know the right answer?
You will create a class called DiceArray. java which simulates the rolling of five six-sided dice 7,...
Questions
question
Mathematics, 23.02.2021 21:50
question
Mathematics, 23.02.2021 21:50
question
Health, 23.02.2021 21:50
question
Computers and Technology, 23.02.2021 21:50
question
Computers and Technology, 23.02.2021 21:50
question
Mathematics, 23.02.2021 21:50
Questions on the website: 13722360