// Arup Guha
// 2/15/2018
// Savings Account Class from Inheritance MC Questions

public class SavingsAccount extends BankAccount {

	private double myInterestRate;

	public SavingsAccount() {
		myInterestRate = .0025;
	}

	public SavingsAccount(double balance, double rate) {
		super(balance);
		myInterestRate = rate;
	}

	public void addInterest() {
		setBalance(getBalance()*(1+myInterestRate));
	}

	public String toString() {
		return "SAVINGS "+ getBalance()+" rate of "+myInterestRate;
	}
}