I am so sorry for not explaining myself. I just cant compile the
TestBanking.java here is the error message. I hope you can tell me
why it won't compile.
A:\MOD06\exercise2\TestBanking.java:22: addAccount(int) in
banking.Customer cannot be applied to (banking.SavingsAccount)
customer.addAccount(new SavingsAccount(500.00, 0.05));
^
A:\MOD06\exercise2\TestBanking.java:23: addAccount(int) in
banking.Customer cannot be applied to (banking.CheckingAccount)
customer.addAccount(new CheckingAccount(200.00, 400.00));
^
A:\MOD06\exercise2\TestBanking.java:27: addAccount(int) in
banking.Customer cannot be applied to (banking.CheckingAccount)
customer.addAccount(new CheckingAccount(200.00));
^
A:\MOD06\exercise2\TestBanking.java:31: addAccount(int) in
banking.Customer cannot be applied to (banking.SavingsAccount)
customer.addAccount(new SavingsAccount(1500.00, 0.05));
^
A:\MOD06\exercise2\TestBanking.java:32: addAccount(int) in
banking.Customer cannot be applied to (banking.CheckingAccount)
customer.addAccount(new CheckingAccount(200.00));
^
A:\MOD06\exercise2\TestBanking.java:37: getAccount() in
banking.Customer cannot be applied to (int)
customer.addAccount(bank.getCustomer(2).getAccount(1));
^
A:\MOD06\exercise2\TestBanking.java:38: addAccount(int) in
banking.Customer cannot be applied to (banking.SavingsAccount)
customer.addAccount(new SavingsAccount(150.00, 0.05));
^
A:\MOD06\exercise2\TestBanking.java:53: getAccount() in
banking.Customer cannot be applied to (int)
Account account = customer.getAccount(acct_idx);
^
A:\MOD06\exercise2\TestBanking.java:73: cannot resolve symbol
symbol : variable account
location: class TestBanking
System.out.println(account_type + ": current balance is " +
account.getBalance());
^
9 errors
Tool completed with exit code 1