Skip to content

feat: implemented SavingsAccount and BusinessCheckingAccount classes #551

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

Closed
wants to merge 5 commits into from

Conversation

marleomac3
Copy link
Contributor

  • Added functionality to prevent checks being drawn against SavingsAccounts
  • Business Checking Accounts now must have "LLC." or "INC." in the name (case-insensitive)
  • Business Checking Accounts also must have a minimum balance of $10,000

*/
public void withdrawFunds(String accountNumber, double amount) {
CheckingAccount account = getAccountOrThrow(accountNumber);
if ((account instanceof BusinessCheckingAccount)) {
if (account.getBalance() - amount < 10000) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add this? This was not in the requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants