Skip to content

Commit b4b886b

Browse files
committed
feat: modified Javadocs for Check and BankAtm classes
1 parent 22fd2a9 commit b4b886b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lesson_17/bank/bank_app/src/main/java/com/codedifferently/lesson17/bank/BankAtm.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package com.codedifferently.lesson17.bank;
22

3-
import com.codedifferently.lesson17.bank.exceptions.AccountNotFoundException;
43
import java.util.HashMap;
54
import java.util.Map;
65
import java.util.Set;
76
import java.util.UUID;
87

8+
import com.codedifferently.lesson17.bank.exceptions.AccountNotFoundException;
9+
910
/** Represents a bank ATM. */
1011
public 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);

lesson_17/bank/bank_app/src/main/java/com/codedifferently/lesson17/bank/Check.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)) {

0 commit comments

Comments
 (0)