Source of PurchaseDemo.java


  1: 
  2: public class PurchaseDemo
  3: {
  4:     public static void main(String[] args)
  5:     {
  6:         Purchase oneSale = new Purchase( );
  7:         oneSale.readInput( );
  8:         oneSale.writeOutput( );
  9:         System.out.println("Cost each $" + oneSale.getUnitCost( ));
 10:         System.out.println("Total cost $"
 11:                                    + oneSale.getTotalCost( ));
 12:     }
 13: }