Question: Plz use simple Java language. Thank you [after 9.6-moderate Dice-Throwing Simulator : Write a complete program that simulates the rolling of two dice. More specifically,
[after 9.6-moderate Dice-Throwing Simulator : Write a complete program that simulates the rolling of two dice. More specifically, it simulatesa user-specified number of rolls and then prints a histogram of the number of rolls for each possible pair value. In other words, it prints a histogram for the number of times that two was thrown, the number of times that three was thrown, and so on, all the way up to the number of times that twelve was thrown. Use a frequency array to keep track of the number of times each pair value is thrown. For example, the frequency [2] element holds the number of times two is thrown. The frequency [3] element holds the number of times three is thrown. As part of your program, write a Dicesimulation class that implements these methods: . newsimulation- This method clears out the frequency array (assigns all elements to prompts the user for the number of rolls, and then simulates the rolls
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
