Fixed some issues, and made things readible from File.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
package me.zacharias.bank;
|
||||
|
||||
import static me.zacharias.bank.Account.Interests.SAVINGS_ACCOUNT_INTEREST_RATE;
|
||||
|
||||
/**
|
||||
* This class only works as a way to have prefilled information, but can be replaced by just calling the {@link Account#Account(String, double, double)} instead
|
||||
*/
|
||||
public class SavingsAccount extends Account{
|
||||
|
||||
public SavingsAccount(String name, int balance) {
|
||||
super(name, balance);
|
||||
}
|
||||
|
||||
@Override
|
||||
double getInterestRate() {
|
||||
return 0.05;
|
||||
public SavingsAccount(String name, double balance) {
|
||||
super(name, balance, SAVINGS_ACCOUNT_INTEREST_RATE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user