/** *test the CashRegister class. * * @author Anne DeFrance * @version September 21,2005 * * I made a few changes to the formatting of the output from what we did in class */ public class TestCashR { public static void main(String args[]) { CashRegister cust1 = new CashRegister(); CashRegister cust2 = new CashRegister(); cust1.ringUpItem(50.00); cust1.ringUpItem(0.25); cust2.ringUpItem(4.75); cust1.ringUpItem(3.89); cust2.ringUpItem(1.25); cust1.amtPaid(75.00); System.out.println("Customer 1 data: " + cust1); //double change =cust1.changeNeeded() ; // another way to do this is below System.out.println("Customer 1 change is " + cust1.changeNeeded()); System.out.println(); // for a blank line System.out.println("Customer 2: " + cust2); }// end main }