File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
lesson_17/bank/bank_app/src/main/java/com/codedifferently/lesson17/bank Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11package com .codedifferently .lesson17 .bank ;
22
3- import com .codedifferently .lesson17 .bank .exceptions .AccountNotFoundException ;
43import java .util .HashMap ;
54import java .util .Map ;
65import java .util .Set ;
76import java .util .UUID ;
87
8+ import com .codedifferently .lesson17 .bank .exceptions .AccountNotFoundException ;
9+
910/** Represents a bank ATM. */
1011public class BankAtm {
1112
@@ -65,10 +66,13 @@ public void depositFunds(String accountNumber, Check check) {
6566 }
6667
6768 /**
68- * Withdraws funds from an account.
69+ * Withdraws funds from a specified account.
70+ *
71+ * @param accountNumber The unique identifier of the account.
72+ * @param amount The amount to withdraw from the account.
6973 *
70- * @param accountNumber
71- * @param amount
74+ * @throws IllegalArgumentException if the account is not found or if the withdrawal
75+ * would result in a balance below $10,000 for a BusinessCheckingAccount.
7276 */
7377 public void withdrawFunds (String accountNumber , double amount ) {
7478 CheckingAccount account = getAccountOrThrow (accountNumber );
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ public class Check {
1717 * @param amount The amount of the check.
1818 * @param account The account the check is drawn on.
1919 * @throws IllegalArgumentException if the amount is negative or the account is not a
20- * `CheckingAccount` instance.
20+ * `CheckingAccount` or `BusinessCheckingAccount` instance.
2121 */
2222 public Check (String checkNumber , double amount , CheckingAccount account ) {
2323 if ((account instanceof SavingsAccount )) {
You can’t perform that action at this time.
0 commit comments