https://github.com/opentable/code-kata-shopping-cart
https://github.com/opentable/code-kata-shopping-cart
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/opentable/code-kata-shopping-cart
- Owner: opentable
- Created: 2019-02-12T09:34:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-08T22:05:23.000Z (over 5 years ago)
- Last Synced: 2025-01-28T23:09:50.965Z (5 months ago)
- Size: 5.86 KB
- Stars: 0
- Watchers: 16
- Forks: 22
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CODE-KATA-Shopping-Cart
## Workflow
- Treat this like a real assignment, but only spend up to two hours on it - it doesn't matter how far you get
- Fork the project to your personal Github account (click on the fork button in the top right corner)
- Clone the forked version of this repository
- Include a `README`
- Push your work up to your fork
- Submit a link to your forked repository## Instructions
You should implement a supermarket checkout which:
- always accepts a string of items and gives back the total price
- discounts any offers from the total priceUse the following pricing information:
| Item | Price | Offer |
| :---: | :---: | :---: |
| A | 50 | 3 for 130 |
| B | 30 | 2 for 37 |
| C | 20 | N/A |
| D | 10 | N/A |For example:
- `'DABA'` gives `140`
- `'BBBB'` gives `74`