Answered You can hire a professional tutor to get the answer.

QUESTION

JAVA CodingIn this section, you are given a piece of working software that

JAVA Coding

In this section, you are given a piece of working software that

has 5 classes: the driver class TestLabVersion1, the Account class, the CheckingAccount, the SavingsAccount class, and the Bank class. Both the CheckingAccount and the SavingsAccount are children of Account. The Bank class contains different kinds of accounts. 

In this lab, we assume that both CheckingAccount and SavinsAccount earn interest. The interest rate for checkingAccout is 0.05; the interest rate for SavingsAccount is 0.12. The getBalance() in the CheckingAccount will add 5% interest to the balance and return the total (do not change the balance in the parent class); the getBalance() in the SavingsAccount will add 12% interest to the balance and return the total (do not change the balance in the parent class). The class CheckingAccount and SavingsAccount are similar except the following two differences: 1) the interest rate is different. 2) the SavingsAccount has an extra method "getTax()" which returns the tax amount that is calculated according to the expression "tax = balance * 0.01." The Bank class is the container that hosts different kinds of accounts. It has a method toString() that displays the content of accounts.

--------------------------------------------------------------------------------------Account begin

public class Account

{

      private double balance;

      private String name;

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question