Fixed some issues, and made things readible from File.

This commit is contained in:
2025-03-19 21:57:36 +01:00
parent 32c93fd99f
commit 5f192d1860
8 changed files with 277 additions and 25 deletions

View File

@@ -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);
}
}