The Dice Problem

  1. Write a class called Die. (That's the singular form of the word "dice" for those of you who loathe ambiguity.) The Die class should have the following:
  2. In public static void main(), create an array of four six-sided Die objects. We will discuss how to do this in class; if you miss class, find a classmate or find me to make sure you can do this.
  3. Roll four dice 1000 times and display the number of times each sum is rolled.

(1 XC point) If you want to go for the glory, display these results in a histogram. You will need an array to store results. Fancy colors are unnecessary. You will also need a class that extends JFrame. Just make clear what the numbers are and that the bars are of appropriate length.

Here is the definition of a histogram.