- Code files to calculate the price of input items.
- Items, prices and discounts are configurable through json file.
- N-Unit test to test code function.
Open solution file @/ItemPriceCalculator - PriceCalculator.sln
Discount There are 2 ways discount can be given on products
- Direct percentage discount on a product
- Exended Disocunt -Percentage discount on a product on purcahse of N quantities of another product.
Example
-
Apples have a 10% discount off their normal price this week
-
Extended Discount - Buy 2 cans of Bean and get a loaf of bread for half price. This will be applied only if there is no original discount on second item such as bread.