/**
 * A driver that can be used to test the StateTaxes class
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */
public class StateDriver
{
    /**
     * The entry-point of the application
     *
     * @param args   The command-line arguments
     */
    public static void main(String[] args)
    {

       // StateTaxes.salesTax();
       System.out.println("\nsalesTax()");       
       {
          double[] values  = {-1.00, 0.00, 0.05, 0.20, 1.00, 70.00, 82.40 };
          double[] correct = { 0.00, 0.00, 0.00, 0.01, 0.05,  3.50,  4.12 };
       
       
          for (int i=0; i<values.length; i++)
          {
             double   tax;
             
             tax = StateTaxes.salesTax(values[i]);
             System.out.printf("Actual: %8.4f\tExpected: %8.4f\n", 
                               tax, correct[i]);
             
          }
       }


      //  StateTaxes.foodExemption();
       System.out.println("\nfoodExemption()");       
       {
          double[] values  = {-1.00, 0.00, 0.05,  0.20,  1.00, 70.00, 82.40 };
          double[] correct = { 0.00, 0.00, 0.001, 0.004, 0.02,  1.40,  1.648};
       
       
          for (int i=0; i<values.length; i++)
          {
             double   tax;
             
             tax = StateTaxes.foodExemption(values[i]);
             System.out.printf("Actual: %8.4f\tExpected: %8.4f\n", 
                               tax, correct[i]);
             
          }
       }




      //  StateTaxes.foodTax();
       System.out.println("\nfoodTax()");       
       {
          double[] values  = {-1.00, 0.00, 0.05,  0.20,  1.00, 70.00, 82.40 };
          double[] correct = { 0.00, 0.00, 0.00,  0.006, 0.03,  2.10,  2.472};
       
       
          for (int i=0; i<values.length; i++)
          {
             double   tax;
             
             tax = StateTaxes.foodTax(values[i]);
             System.out.printf("Actual: %8.4f\tExpected: %8.4f\n", 
                               tax, correct[i]);
             
          }
       }




    }
    
    
}