/*
  Lab exam 21/11/2006
  Test program Part 2
*/

public class TestUseCCAccount {
	
  public static void main(String[] args) {

    CCAccount a1 = new CCAccount("Mario Rossi", "ABCD0001", 100);
    CCAccount a2 = new CCAccount("Carlo Bruni", "EFGH0001", 100);

    a1.spend(10);
    a2.spend(20);
    System.out.println(a1);
    System.out.println(a2);
    System.out.println(UseCCAccount.getMinRemainingExpenses(a1, a2));

    System.out.println();
    a1.spend(30);
    System.out.println(a1);
    System.out.println(a2);
    System.out.println(UseCCAccount.getMinRemainingExpenses(a1, a2));

    System.out.println();
    a1.spend(60);
    System.out.println(a1);
    System.out.println(a2);
    System.out.println(UseCCAccount.getMinRemainingExpenses(a1, a2));

    System.out.println();
    a2.spend(80);
    System.out.println(a1);
    System.out.println(a2);
    System.out.println(UseCCAccount.getMinRemainingExpenses(a1, a2));

  }
}

