/**
 * A utility class that can be used to calculate local taxes.
 *
 * In this case, the only local taxes are on prepared foods.
 *
 *
 * This work complies with the JMU Honor Code.
 *
 * @author  Cory McDaniel
 * @version 1.1
 */
public class LocalTaxes
{
    private static double PREPARED_FOOD_SURCHARGE_RATE      = 0.07;

    /**
     * Calculates the surcharge on prepared food
     *
     * @param value   The value of the prepared food
     * @return        The surcharge (in dollars)
     */
    public static double preparedFoodSurcharge(double value)
    {
       double   surcharge;
       
       if (value > 0.00)
    	   //occurs only when the items value is greater than 0
    	   surcharge = value * 0.07;
       else
    	   surcharge = 0.00;

       return surcharge;       
    }
    
    /**
     * Calculates the tax on prepared food
     *
     * @param value   The value of the prepared food
     * @return        The tax (in dollars)
     */
    public static double preparedFoodTax(double value)
    {
       double   tax;

       tax = StateTaxes.salesTax(value) + LocalTaxes.preparedFoodSurcharge(value);
       //adds the salesTax and the preparedFoodSurcharge
       
       return tax;       
    }
    
}
