1
1
package com .codedifferently .lesson17 .bank ;
2
2
3
- import com .codedifferently .lesson17 .bank .exceptions .AccountNotFoundException ;
4
3
import java .util .HashMap ;
5
4
import java .util .Map ;
6
5
import java .util .Set ;
7
6
import java .util .UUID ;
8
7
8
+ import com .codedifferently .lesson17 .bank .exceptions .AccountNotFoundException ;
9
+
9
10
/** Represents a bank ATM. */
10
11
public class BankAtm {
11
12
@@ -59,7 +60,7 @@ public Set<CheckingAccount> findAccountsByCustomerId(UUID customerId) {
59
60
public void depositFunds (String accountNumber , double amount ) {
60
61
CheckingAccount account = getAccountOrThrow (accountNumber );
61
62
account .deposit (amount );
62
- auditLog .logTransaction ("Deposited to account: " + accountNumber , amount , "Deposit" );
63
+ auditLog .logTransaction ("Deposited to account: " + accountNumber , accountNumber , amount , "Deposit" );
63
64
}
64
65
65
66
/**
@@ -72,7 +73,7 @@ public void depositFunds(String accountNumber, Check check) {
72
73
CheckingAccount account = getAccountOrThrow (accountNumber );
73
74
check .depositFunds (account );
74
75
auditLog .logTransaction (
75
- "Deposited check to account: " + accountNumber , check .getAmount (), "Check Deposit" );
76
+ "Deposited check to account: " + accountNumber , accountNumber , check .getAmount (), "Check Deposit" );
76
77
}
77
78
78
79
/**
@@ -84,7 +85,7 @@ public void depositFunds(String accountNumber, Check check) {
84
85
public void withdrawFunds (String accountNumber , double amount ) {
85
86
CheckingAccount account = getAccountOrThrow (accountNumber );
86
87
account .withdraw (amount );
87
- auditLog .logTransaction ("Withdrew from account: " + accountNumber , amount , "Withdrawal" );
88
+ auditLog .logTransaction ("Withdrew from account: " + accountNumber , accountNumber , amount , "Withdrawal" );
88
89
}
89
90
90
91
/**
0 commit comments