// A class for dates that hides the fields and provides access methods.
// Barry Cornelius, 19 June 2000
public class Date
{
   private int iYear;
   private int iMonth;
   private int iDay;
   public Date(final int pYear, final int pMonth, final int pDay) 
   {
      iYear = pYear;
      iMonth = pMonth;
      iDay = pDay;
   }
   public int getYear()
   {
      return iYear;
   }
   public int getMonth()
   {
      return iMonth;
   }
   public int getDay()
   {
      return iDay;
   }
   public void setYear(final int pYear)
   {
      iYear = pYear;
   }
   public void setMonth(final int pMonth)
   {
      iMonth = pMonth;
   }
   public void setDay(final int pDay)
   {
      iDay = pDay;
   }
   public String toString()
   {
      return iYear + "-" + iMonth/10 + iMonth%10 + "-" + iDay/10 + iDay%10;
   }
}
