/**
 * 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  Daniel Heck
 * @version 1.1	9/6/08
 */
public class LocalTaxes
{
    private static double PREPARED_FOOD_SURCHARGE_RATE      = 0.07;

    /**
     * Calculate 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;
       
       //Catch a negative value and set the value to zero if so
       if(value > 0)
       		surcharge = value * PREPARED_FOOD_SURCHARGE_RATE;
       else
       		surcharge = 0;



       return surcharge;  //Returned the finished surcharge value     
    }//end method preparedFoodSurcharge
    

    /**
     * Calculate 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; //Create local double variable tax for return and adding
       
		//Initialize tax to preparedFoodSurcharge by calling the method
		//Then add the State sales tax
		tax = preparedFoodSurcharge(value) + StateTaxes.salesTax(value);

       return tax; //return the finalized tax
    }//end preparedFoodTax method
}//end Class LocalTaxes
