/*
   This program uses the Hat class. Notice that this program
   works fine with either implementation of the Hat class, the
   implementation contained in the subdirectory Hat1 or the
   implementation from the subdirectory Hat2.

   NOTE: Before you can compile this program you must copy into
   this directory one of the Hat.class files from either of the
   subdirectories Hat1 or Hat2.
*/

public class UseHat
{
   public static void main(String[] args)
   {
      // create an array of type Hat
      Hat[] hats = new Hat[5];

      // fill the array with Hat objects
      hats[0] = new Hat();
      hats[1] = new Hat(Hat.SMALL, Hat.BEANIE, Hat.BLUE);
      hats[2] = new Hat(Hat.LARGE, Hat.BASEBALL, Hat.RED);
      hats[3] = new Hat(Hat.MEDIUM, Hat.BASEBALL, Hat.RED);
      hats[4] = new Hat(Hat.MEDIUM, 5, Hat.WHITE);

      // loop through the array and print out the hats
      for (int i = 0; i < hats.length; i++)
      {
         System.out.println(hats[i]);
      }
   }//main

}//UseHat