This is a checkout system for a shop which sells only apples and oranges. The system takes a list of items scanned at the till and outputs the total cost. Apples cost 60p and oranges cost 25p.
Checkout system provides two services -
- BasicShoppingCart - Very basic shopping cart checkout - Takes list of items and output the cost.
- OfferShoppingCart -
This applies current offers and calculates the cost of the basket. Offers can be of two types -
- buy one, get one free on Apples
- 3 for the price of 2 on Oranges
Use SBT tool command to compile, test and run the application.