Question: Write a Java program to simulate the roll of a die. Your program should prompt the user for a name and then proceed to roll

 Write a Java program to simulate the roll of a die.

Write a Java program to simulate the roll of a die. Your program should prompt the user for a name and then proceed to roll the die and inform the user of the face value on the die. Your program should run as shown below: What is your name? James Dean Rolling the dice... James Dean, you rolled 5 ! Hint: Use the random method in the Math class to simulate the roll of the die. Note: CodeRunner cannot currently test for random number so change your code to set the value of the dice to 5 before testing For example

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!