
/**     										WEIGHT.JAVA
 * A weight in traditional U.S. units (i.e., pounds and ounces)
 *
 * This is a simple version of weights *
 * @author  Nancy Harris, James Madison
 * @version 3.0  
 */
    public class Weight 
	 {
      private int pounds;
      private int ounces;
     	
    /**
     * Default Constructor
     */
       public Weight()
      {
         pounds = 0;
         ounces = 0;
      }
   
    /**
     * Explicit Value Constructor
     *
     * @param pounds  The number of pounds (must be positive)
     * @param ounces  The number of ounces (must be positive)
     */
       public Weight(int pounds, int ounces)
      {
         this.pounds = pounds;
         this.ounces = ounces;
      }
   
		/** 
		 * @return Returns a String representation of this Weight
		 */
       public String toString()
      {
         String builder;
      	
         builder = "" + pounds;
         if (pounds == 1) builder += " pound and ";
         else builder += " pounds and ";
      	
         builder += ounces;
      	
         if (ounces == 1) builder += " ounce.";
         else builder += " ounces.";
      	
         return builder;
      }
   } // end Weight
