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. 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
Get step-by-step solutions from verified subject matter experts
