Question: how would I write this code in java? Step 1 - Create the Dice Class Code the following components in the file - 1. Define

Step 1 - Create the Dice Class Code the following components in the file - 1. Define the class named Dice 2. Two instance properties and which will be used to store the value of each dice (16). 3. A method takes no arguments. When called, the method will generate random numbers between 16 and assign them to and A cifferent random number will be generated for each die. The return type should be void. You will need to figure out how to generate the random numbers for the dice in Lava. 4. A and 12, method will return the sum of both dice values as an integer when called. This should be a number between 2 5. 5. is the getter method that returns the value of the first dice. 6 is the getter method that returns the value of the second dice. Step Two - Roll and Display In otder to test your (dass, you will need to complete the method, in this method instantiate a Retuin the total of the dice roll There is already code inside of the to call the method 24 usages 2 github-classroom[bot] public class Dice II Define class variables here I/ Define class methods here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
