public class ShakeEm
{
  public static void main (String [] args)
  {
     Oddie one, two, three;
	  int oddie7;
	  int faceValue;
	  
     // initialize the Oddie7 counter
     oddie7 = 0;
  
	  // create the three Oddie objects
     one = new Oddie();
	  two = new Oddie();
	  three = new Oddie();

     for (int i = 0; i < 1500; i++)
	  {
	  	  // roll the first Oddie
	     faceValue = one.roll();  
	  // set its face value
	     one.setFaceValue(faceValue);
	  // roll the second Oddie
	     faceValue = two.roll();
	  // set its face value
	     two.setFaceValue(faceValue);
	  // roll the third Oddie
	  	  faceValue = three.roll();
	  // set its face value
	     three.setFaceValue(faceValue);
	  // If any of the Oddies have a face value of 7, up the
	  // Oddie7 count 
	     if ( (one.getFaceValue() == 7) || (two.getFaceValue()== 7) ||
		     (three.getFaceValue() == 7))
			  oddie7 = oddie7 + 1;
		 } 
	  
	  	  
	  
	  // printout the total number of rolls and the Oddie7 count.
	     System.out.println 
		     (" The total number of rolls was 1500 and " + oddie7 +
			  " of the rolls was a 7 ");
		  
	  
	  // end the program gracefully
	     System.out.println (" this program has ended normally ");
		 }
		}