public class Section11 {
  public static void main(String[] args) {
    
    int nRolls= 100000;      //number of rolls for each die
    Dice d6= new Dice();     //6-sided die
    Dice d15= new Dice(15);  //15-sided die
    
    int difference;
    double total= 0;
    for (int k=1; k<=nRolls; k++) {
      d6.roll();
      d15.roll();
      difference= Math.abs(d15.getTop() - d6.getTop());
      total+= difference;
      if (k%1000==0)
        System.out.println("k=" + k + ":  " + total/k);
    }
    System.out.print("Expected difference between the top faces of a ");
    System.out.println("6-sided and a 15-sided dice is " + total/nRolls);
  }
}
    
    
   