This preview shows page 1. Sign up to view the full content.
Unformatted text preview: //withdraw $50 from Sally's account acct1.withdraw(50); //print Sally's new balance (use getBalance()) System.out.println ("Sally's new balance is $" + acct1.getBalance()); //charge fees to both accounts System.out.println ("Sally's balance after charging a fee is " + acct1.chargeFee()); System.out.println ("Joe's balance after charging a fee is " + acct2.chargeFee()); //change the name on Joe's account to Joseph acct2.changeName("Joseph"); //print summary for both accounts System.out.println(acct1); System.out.println(acct2); } }...
View Full Document
This note was uploaded on 03/22/2010 for the course CS 202 taught by Professor Fong during the Spring '10 term at SIU Carbondale.
- Spring '10
- Computer Science