// Arup Guha
// 2/15/2018
// Bank Account Class from Inheritance MC Questions

public class BankAccount {

	private double myBalance;

	public BankAccount() {
		myBalance = 0;
	}

	public BankAccount(double balance) {
		myBalance = balance;
	}

	public void deposit(double amount) {
		myBalance += amount;
	}

	public void withdraw(double amount) {
		myBalance -= amount;
	}

	public double getBalance() {
		return myBalance;
	}

	// Otherwise it's impossible to implement addInterest() in Savings Account
	public void setBalance(double newBal) {
		myBalance = newBal;
	}

	public String toString() {
		return "REG ACCT "+myBalance;
	}
}