JAVA Homework 8
Assignment 8
- Due Friday by 11:59pm
- Points 20
- Submitting a file upload
- File Types java and zip
Do Business P8.19 on page 409 of your textbook.
* Business P8.19 Implement a class Portfolio. This class has two objects, checking and savings, of the
type BankAccount that was developed in Worked Example 8.1 (ch08/worked_example_1/
BankAccount.java in your code files). Implement four methods:
• public void deposit(double amount, String account)
• public void withdraw(double amount, String account)
• public void transfer(double amount, String account) )
• public double getBalance(String account)
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.