-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomerReview_Exercise_Overview.txt
19 lines (15 loc) · 1.13 KB
/
CustomerReview_Exercise_Overview.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Customer Review Exercise Overview
• In this exercise you will need to extend out of the box features.
• Do not overwrite source code found in the “customerreviewserver.jar.src” folder.
• You do not need to compile/run the exercise at the end.
• Syntax matters, do your best to write Java code that would compile (no pseudo code).
Tools you will need:
• Your favourite text editor
Requirements
1. Provide a way to get a product’s total number of customer reviews whose ratings are within a given range (inclusive).
2. Add the following additional checks before creating a customer review:
a. Your service should read a list of curse words. This list should not be defined in Java class.
b. Check if Customer’s comment contains any of these curse words. If it does, throw an exception with a message.
c. Check if the rating is not < 0. If it is < 0, throw an exception with a message.
If all the rules are passed, go ahead and create the customer review.
3. Ensure the new functionality can be used elsewhere in the application (i.e. a bean containing the new functionality is defined within the customerreview-spring.xml).