- Sainsbury's want us to create a checkout app for them
- Three products with two discounts to be built in
- See details below
- The app should have two methods -
#scan
and#calculateTotal
- Products can be represented as Strings
Name | Rule |
---|---|
Lavender heart multibuy | 2 or more drops their price to £8.50 |
Large order discount | £60 or more gives a 10% discount |
Product code | Name | Price |
---|---|---|
heart | Lavender heart | £9.25 |
cufflinks | Personalised cufflinks | £45.00 |
tshirt | Kids T-shirt | £19.95 |