
/**
 * Checkout3.java
 *
 *
 * Created: Tue Nov 19 22:41:23 2002
 *
 * @author <a href="mailto:bina@cse.buffalo.edu "</a>
 * @version
 */
import java.text.*;
import java.util.Locale;

public class Checkout3 {
public static void main (String[] args) {
      double price1= 4.5, price2= 7.8, price3= 6.5;
      double total;
      double tax;

      NumberFormat nf = 
       NumberFormat.getCurrencyInstance(Locale.US);
    
      TaxRule t = new CanadaTaxRuleNew();// can be replaced by CanadaTaxRule

      
      total = price1 + price2 + price3;

      System.out.println("The total price before tax is: " + nf.format(total));

      PriceTax pt = (PriceTax)t.computeTax(new Double(total));

      System.out.println("The total  tax is: " + 
			 nf.format(pt.getTax()));
      System.out.println("The total price after tax is: " + 
			 nf.format(pt.getTotal()));
      
   } // end of main ()
   
}// Checkout3
