public static void transfer(Account fromAcct, Account toAcct, double amt)Compile your revised Account class.
Also add a static method Account consolidate(Account acct1, Account acct2) to your Account class that creates a new account whose balance is the sum of the balances in acct1 and acct2 and closes acct1 and acct2. The new account should be returned. Two important rules of consolidation:
Print Account.java and TestAccounts2.java to turn in.
Print IntWrapper.java and CharWrapper.java to turn in.
Caution: The signature for showMessageDialog is wrong in the text (p. 301), where it says that it returns int, and the signature for showInputDialog is wrong in the appendix (p. 853), where it says that it returns void.
File Dialogs.java contains a simple program that uses dialog boxes to prompt the user for two test grades and then displays the average of those grades. Study this program; note that the value returned by the showInputDialog method is a String, so the parseInt method of the Integer class must be used to gets its integer value.
Now save it to your directory and run it. (When you're done you'll have to press Ctrl-c to get back to the prompt.) After doing it the usual way, try entering a value that is not an integer. The exception you see comes from the parseInt method -- it's saying that the value entered is not a legal format for the kind of number required (int).
Modify the Dialogs class as follows (use dialog boxes for all input and output):
Print Dialogs.java to turn in.