Commit e6364472 authored by gavin.white's avatar gavin.white

Upload New File

parent 9386f8b2
package assessment;
public class SavingsAccount extends BankAccount {
// constructor
public SavingsAccount(int accountNumber, String name) {
super(accountNumber, name);
}
// accrue interest on the current balance
public void accrueInterest() {
double interest = this.getBalance() * 0.05;
this.deposit(interest);
}
// override the addOverdraft() method to prevent a SavingsAccount from having an
// overdraft limit
@Override
public void addOverdraft(double overdraftLimit) {
// do nothing
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment