      1  /**

      2     This program tests the CashRegister class.

      3  */

      4  public class CashRegisterTester

      5  {

      6     public static void main(String[] args)

      7     {

      8        CashRegister register1 = new CashRegister();

      9        register1.addItem(1.95);

     10        register1.addItem(0.95);

     11        register1.addItem(2.50);

     12        System.out.println(register1.getCount());

     13        System.out.println("Expected: 3");

     14        System.out.printf("%.2f\n", register1.getTotal());

     15        System.out.println("Expected: 5.40");

     16     }

     17  }