From 3e11bc44c9d4c288e9c75d837f1278020fc5c150 Mon Sep 17 00:00:00 2001 From: 100yo Date: Sat, 30 Nov 2024 08:42:25 +0200 Subject: [PATCH] Update Lab 08 assignment: one more method in interface --- 08-lambdas-and-stream-api/lab/README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/08-lambdas-and-stream-api/lab/README.md b/08-lambdas-and-stream-api/lab/README.md index 5c82ed92..b294e51b 100644 --- a/08-lambdas-and-stream-api/lab/README.md +++ b/08-lambdas-and-stream-api/lab/README.md @@ -67,10 +67,18 @@ public interface TransactionAnalyzer { */ List 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).