-
Notifications
You must be signed in to change notification settings - Fork 24
feat: implement bank account system with audit logging and support fo… #528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…r multiple account types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep going, you're headed in the right direction.
|
||
// Method to add a value to an existing ArrayList or create a new one if accountNumber doesn't | ||
// exist | ||
public void addToMap( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is weird. Maybe do some research on how to build a logger object. No too difficult to make a simple one.
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
public abstract class BankAccount { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of building your own BankAccount
class from scratch, you could take the logic from CheckingAccount
.
@@ -128,4 +132,19 @@ public String toString() { | |||
+ isActive | |||
+ '}'; | |||
} | |||
@Override | |||
public void withdraw(double amount) throws InsufficientFundsException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should all be in the superclass since these are good checks for all accounts, no matter the type.
this.isBusiness = isBusiness; | ||
} | ||
|
||
public boolean isBusiness() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
…CheckingAccount classes
…sts; enhance Check and BankAccount classes
…ed account instance
I tried... Ant don't cook me... Remember you said "perfect is the enemy of good." |
Not finished still working on it.... can I get my extension please?