You have been asked to model a shopping basket.
You must be able to:
- add items to the shopping basket,
- remove items from the shopping basket,
- empty the shopping basket.
Additionally, you must be able to calculate the total value of the shopping basket. This should account for:
- buy-one-get-one-free discounts on items,
- 10% off on totals greater than £20 (after previous discount is applied),
- 2% off on total for customers with loyalty cards (after all other discounts are applied).
You must be able to validate that the code works through passing tests.
What we will be looking for: Evidence of 'solid' coding techniques and test driven development.