Implement a class Bank.

 Implement a class Bank. This bank has two objects
  • checking
  • andsavings
of the type 
Account
that was developed in the preceding exercise.
Implement four instance methods:
deposit(double amount, String account)withdraw(double amount, String account)transfer(double amount, String account) printBalances()
Here the account string is
"S"
or
"C"
. For the deposit or withdrawal, it indicates which account is affected. For a transfer it indicates the account from which the money is taken; the money is automatically transferred to the other account.

Comments

Popular posts from this blog

Aspiring Engineers Should Know About

Information systems papers

Amazon Web Service and Microsoft Azure