This preview shows page 1. Sign up to view the full content.
Unformatted text preview: System.out.println("Created account for " + name + " with balance $100."); //Create third account System.out.print("\nEnter name for third account: "); name = scan.next(); acct3 = new Account(100, name); System.out.println("Created account for " + name + " with balance $100."); //Close first account System.out.println("Closing first account."); acct1.close(); //Consolidate second and third accounts System.out.println("Trying to consolidate second and third accounts."); acct4 = Account.consolidate(acct2, acct3); System.out.println("Result account is " + acct4); //Print number of accounts System.out.println("Number of accounts is now " + Account.getNumAccounts()); } }...
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