This program demonstrates a simple discount calculation for given criterias according to Orders and Users. The criterias are; On a retail website, the following discounts apply:
-
If the user is an employee of the store, he gets a 30% discount
-
If the user is an affiliate of the store, he gets a 10% discount
-
If the user has been a customer for over 2 years, he gets a 5% discount.
-
For every $100 on the bill, there would be a $ 5 discount (e.g. for $ 990, you get $ 45 as a discount).
-
The percentage based discounts do not apply on groceries.
-
A user can get only one of the percentage based discounts on a bill.
-
Please note that the program does not have a user interface.
You can just download the project and run the test. Sample console methods are defined at main class, if you would like to take a look.
Since this is a Java program, Java SDK (at least Java 8) is required. Also, gradle
must be installed, if you do not have a gradle integrated IDE like IntelliJ IDEA
.
Since the project manages dependencies via gradle, you can directly build and run the project, once you download it.
Detailed test scenarios are already written. You can run the defined tests directly.
- **C. Engin Bilici ** - dyte
This project is licensed under the MIT License