Question: Create Java code for for a dice rolling sub-method. The sub-method will have one doubleparameter and a void return type. The parameter will determine the

Create Java code for for a dice rolling sub-method. The sub-method will have one doubleparameter and a void return type. The parameter will determine the number simulated rolls of two six-sided dice. For each roll, the program will record the result. The possible results after rolling two six-sided dice are 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, and 12. After the rolls are completed, the program will display how many of each number was rolled along with the frequency. The frequency can be determined by the following formula:

Frequency of value x = (Rolls with result x/Total number of rolls)

For instance: If out of 10 rolls there were 2 sixes. The frequency of sixes would be 2/10 = .2 or 20%

The main method of your program will contain 3 calls to the dice rolling method.

Create a flowchart detailing the program

Create pseudocode for each portion of the code, including the program header

The program needs to accept user input to determine the number of rolls

Run the three cases below and include screenshots of output and frequencies for all numbers

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!