// TimeTest1.java
// Tests class Time's 3-parameter constructor,
// toString, and all get methods.

public class TimeTest1  {
   public static void main(String[] args)
   {
      if ( args.length < 3 )  {
         System.out.println("Use 3 command-line arguments "
                            + "representing an hour, minute, and second.");
         System.exit(0);
      }  // if

      int hour = Integer.parseInt(args[0]);
      int minute = Integer.parseInt(args[1]);
      int second = Integer.parseInt(args[2]);

      testTime(hour, minute, second);
   }  // class main

   public static void testTime(int h, int m, int s)
   {
       Time time = new Time(h, m, s);
       System.out.println(time.to12HourString() + "   "
                          + time + "   "
                          + time.getHour() + " hr, "
                          + time.getMinute() + " min, "
                          + time.getSecond() + " sec, or "
                          + time.getTotalSeconds() + " total seconds.");
       System.out.println("     Was " + h + " hr, " + m + " min, "
                          + s + " sec, or " + (3600*h + 60*m + s)
                          + " total seconds.");
   }  // method testTime
}  // class TimeTest1