/**
 * A driver that can be used to test the LocalTaxes class
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class LocalDriver
{
    /**
     * The entry-point of the application
     *
     * @param args   The command-line arguments
     */
    public static void main(String[] args)
    {

       // LocalTaxes.preparedFoodSurcharge()
       System.out.println("\npreparedFoodSurcharge()");       
       {
          double[] values  = {-1.00, 0.00, 0.05,   0.20,  1.00, 70.00, 82.40 };
          double[] correct = { 0.00, 0.00, 0.0035, 0.014, 0.07,  4.90,  5.768 };
       
       
          for (int i=0; i<values.length; i++)
          {
             double   tax;
             
             tax = LocalTaxes.preparedFoodSurcharge(values[i]);
             System.out.printf("Actual: %8.4f\tExpected: %8.4f\n", 
                               tax, correct[i]);
             
          }
       }


       // LocalTaxes.preparedFoodTax()
       System.out.println("\npreparedFoodTax()");       
       {
          double[] values  = {-1.00, 0.00, 0.05,   0.20,  1.00, 70.00, 82.40 };
          double[] correct = { 0.00, 0.00, 0.0035, 0.024, 0.12,  8.40,  9.888};
       
       
          for (int i=0; i<values.length; i++)
          {
             double   tax;
             
             tax = LocalTaxes.preparedFoodTax(values[i]);
             System.out.printf("Actual: %8.4f\tExpected: %8.4f\n", 
                               tax, correct[i]);
             
          }
       }


    }
    
    
}