/**
 * Driver class that stores dice counts in an array.
 *   @author Dave Reed
 *   @version 8/15/13
 */
public class DiceStats1 {
   public final static int DIE_SIDES = 6;
   public final static int NUM_ROLLS = 10000;
   
   public static void main(String[] args) {
      int[] counts = new int[2*DIE_SIDES+1];
      
      Die die = new Die(DIE_SIDES);
      for (int i = 0; i < NUM_ROLLS; i++) {
         counts[die.roll() + die.roll()]++;
      }
      
      for (int i = 2; i < counts.length; i++) {
         System.out.println(i + ": " + counts[i] + "  ("
                            + (100.0*counts[i]/NUM_ROLLS) + "%)");
      }
   }
}

