Skip to content

Commit

Permalink
Update Lab 08 assignment: one more method in interface
Browse files Browse the repository at this point in the history
  • Loading branch information
100yo committed Nov 30, 2024
1 parent 0f4c678 commit 3e11bc4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions 08-lambdas-and-stream-api/lab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,18 @@ public interface TransactionAnalyzer {
*/
List<Transaction> allTransactionsByUser(String accountId);

/**
* Returns the risk rating of an account with the specified ID.
*
* @return the risk rating as a double-precision floating-point number in the interval [0.0, 1.0].
* @throws IllegalArgumentException if the account ID is null or empty.
*/
double accountRating(String accountId);

/**
* Calculates the risk score for each account based on the loaded rules.
* The score for each account is a double-precision floating-point number in the interval [0, 1]
* and is formed by summing up the weights of all applicable rules to the account transactions.
* The score for each account is a double-precision floating-point number in the interval [0, 1] and is formed
* by summing up the weights of all applicable rules to the account transactions.
* The result is sorted in descending order, with the highest-risk accounts listed first.
*
* @return a map where keys are account IDs (strings) and values are risk scores (doubles).
Expand Down

0 comments on commit 3e11bc4

Please sign in to comment.