[SOLVED] SOLVED: java_die simulation

8.99 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon java_die_simulation_program_file_3.zip (3.7 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

(25 points) Write a Java program to simulate a die. A die has values of either 1, 2, 3, 4, 5 or 6 on the face. You should use the Math.Random() or the java.util.Random() class to generate the values on the die. The program should prompt the user to enter how many times the die should be rolled. The output should show the results of each roll along with the total number of times 1, 2, 3, 4, 5 or 6 occurred for all rolls and the total sum comprised of the sum of all rolls. Here is a sample run: How many times do you want to roll the die? 10 Thank you! The die roll results for 10 rolls were: 2 3 4 5 3 2 6 2 1 6 The number of occurrences of each face were as follows: 1: 1 2: 3 3: 2 4: 1 5: 1 6: 2 The sum of die rolls was: 34

  • java_die_simulation_program_file_3.zip