Have the Die class of Chapter 6 implement the Measurable interface. Generate dice, cast them, and add them to the implementation of the DataSet class in Section. Display the average.

Complete the following file:

Die.java

Use the following file:

DieSimulation.java

/**
   This program simulates casting ten dice and prints out the average.
*/
public class DieSimulation
{
   public static void main(String[] args)
   {
      final int TRIES = 10;
      DataSet ds = new DataSet();
      
      for (int i = 1; i <= TRIES; i++)
      {  
         Die d = new Die(6);
         int n = d.cast();
         ds.add(d);
         System.out.print(n + " ");
      }

      System.out.println();
      System.out.println("Average: " + ds.getAverage());      
   }
}