/** a class to represent US Money values
  *
  * @author - YOUR NAME
  * @version - 1.0 - DATE
  */
public class USMoney
{
   private int dollars;  // the dollar value
   private int cents;    // the cent value
   
   /** 
    * Default constructor, sets this USMoney to $0.00
    */
   public USMoney()
   {
      this.dollars = 0;
      this.cents = 0;
   }
   
   /** 
    * Explicit value constructor. If the cents are > 99
    *  adjust the dollars and cents accordingly (ie. 101 cents 
    *  would be 1 dollar and 1 cent. 
    * 
    * If either constructor parameter is zero, set the money amount to zero.
    *
    *  @param dollar - the dollar value
    *  @param cent - the cents value
    */   
   public USMoney(int dollar, int cent)
   {
      // MAKE ME  
   }
   
   /** 
    * this helper method adjusts this object's dollars and cents based on the number
    * of cents.  If cents is greater than 99, it will increase the dollars
    * and reduce the cents accordingly.  
    */
   private void adjust()
   {
      // MAKE ME  
   }
   
   /** 
    * getCents gets the total number of cents in this USMoney object.
    *  For example, 3 dollars and 5 cents would return 305 
    * 
    *  @return The number of cents in this money object.
    */  
   public int getCents()
   {   
      // MAKE ME    
   }
   
   
   /** 
    * compare compares this USMoney object to another USMoney object. It
    *  returns 1 if this is > than other, 0 if they are the same, -1 if this 
    *  is less than other. 
    * 
    * @param other The USMoney object to compare to this USMoney
    * @return 1 if this > other, 0 if this == other, -1 if this < other
    */
   public int compare (USMoney other)
   {
      // MAKE ME  
   }
   
   /** duplicate creates and returns a new USMoney object that is identical in 
     *  value to the other USMoney object.
     *
     *  @param other  The USMoney object to copy
     *  @return   A new USMoney with the same values as the other USMoney object.
     */
   public static USMoney duplicate(USMoney other)
   {    
      // MAKE ME     
   } 
   
   /** 
    * toString returns a String representation of this USMoney object
    *  (It is provided here to use in testing.)
    * 
    * @return A String representing this USMoney object
    */
   public String toString()
   {
      return String.format("$%d.%d", dollars, cents) ;
   }
   
   /* 
    * countMoney returns the number of times that the target value, in
    * cents, occurs in the array. For example, if target represents
    * $2.55, countMoney will return the number of times that 255 occurs in 
    * the array.
    * 
    * If the array is null, countZeros returns zero.
    *
    *  @param array An integer array
    *  @param target A USMoney object that determines the search target
    *  @return The number of times the target value (in cents) occurs in the array
    */
   public static int countMoney(int[] array, USMoney target)
   {
          // MAKE ME 
   }
}