subject
Engineering, 23.09.2020 23:01 mikailah0988

Part A. you'll build on the CoinFlip. java program. The coin simulation asked you to flip a coin 1000 times and report the outcomes. For Lab 1, you should create a class called DiceSim. java (or similar), which simulates the rolling of five six-sided dice 7,776 times and reports the number of Yahtzees (five of a kind) rolled. You'll either need to use a random generator (java. util. Random) or reuse the Math. random() function, but you'll need to tweak it to simulate a die with sides 1..6 in place of a coin with only 0 and 1 as options. Make sure you don't roll any 0's or 7's...Part B. 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 diagnals. A sample output could look like this1. 456312. 524113. 651214. 413515. 15321A. There are 0 row Yahtzees. B. There are 1 column Yahtzees. C. There are 1 diagonal Yahtzees. Both part A and part B should reside in the same program.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:20
Inadequate stores control is not an obstacle to effective work order system. (clo4) a)-true b)-false
Answers: 3
question
Engineering, 04.07.2019 18:20
Air is compressed isentropically from an initial state of 300 k and 101 kpa to a final temperature of 1000 k. determine the final pressure using the following approaches: (a) approximate analysis (using properties at the average temperature) (b) exact analysis
Answers: 1
question
Engineering, 04.07.2019 18:20
How much power could a wind turbine produce if it had the following specifications? cp = 0.45 -d=1.2kg/m3 d=50m v 5m/s
Answers: 2
question
Engineering, 04.07.2019 19:10
Arigid tank contains 10 kg of air at 137 kpa (abs) and 21°c. more air is added to the tank until the pressure and temperature rise to 242 kpa (abs) and 32°c, respectively. determine the amount of air added to the tank. [r-0.287 kj/kg k]
Answers: 3
You know the right answer?
Part A. you'll build on the CoinFlip. java program. The coin simulation asked you to flip a coin 100...
Questions
question
Mathematics, 09.04.2020 01:44
question
Mathematics, 09.04.2020 01:44
Questions on the website: 13722367