Question: In Java Create a Class named Die with one private integer attribute called face and a method called 1. roll() which receives nothing but returns

In Java

 In Java Create a Class named Die with one private integer

Create a Class named Die with one private integer attribute called face and a method called 1. roll() which receives nothing but returns and integer from 1 to 6. In the main 2. a. b. c. d. Create 2 Die objects Die1 and Die 2 Instantiate an integer array called results with a size of 13. Declare a final constant called ROLLS and set it to 1,000,000 Write the code to roll the dice ROLL times and count the number of doubles and the total of the two dice in results (store double in results[1]) Print out the results to look like the e. 12 Number Count Percent ps 27776 55992 2.7776 5.5992 1/ Doubles 165925 16.5925

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!