Question: Write code in Java to simulate rolling a six-sided die. A six-sided die has the values 1-6 on its faces. The program first asks user
Write code in Java to simulate rolling a six-sided die. A six-sided die has the values 1-6 on its faces. The program first asks user for the number of rolls and then rolls the die for the specified times. The program displays the face values, the number of occurrences of each value, and the frequency of each value in a neat tabular format. Use an int array to store the number of occurrences of 6 values and a double array to store the frequency of 6 values. Display 5 decimal places for floating-point values.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
