https://github.com/somdipdey/the-checkout-kata-supermarket-pricing-in-java
This solution implements a supermarket checkout that calculates the total price of a number of items.
https://github.com/somdipdey/the-checkout-kata-supermarket-pricing-in-java
java java-codes kata price supermarket-checkout
Last synced: 6 months ago
JSON representation
This solution implements a supermarket checkout that calculates the total price of a number of items.
- Host: GitHub
- URL: https://github.com/somdipdey/the-checkout-kata-supermarket-pricing-in-java
- Owner: somdipdey
- Created: 2017-10-23T21:55:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-24T08:06:05.000Z (almost 8 years ago)
- Last Synced: 2025-02-15T10:31:22.102Z (8 months ago)
- Topics: java, java-codes, kata, price, supermarket-checkout
- Language: Java
- Size: 5.89 MB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The-Checkout-Kata-Supermarket-Pricing-In-Java
This solution implements a supermarket checkout that calculates the total price of a number of items.We’re going to see how far we can get in implementing a supermarket checkout that calculates the total price of a number of items. In a normal supermarket, things are identified using Stock Keeping Units, or SKUs. In our store, we’ll use individual letters of the alphabet (A, B, C, and so on). Our goods are priced individually. In addition, some items are multipriced: buy n of them, and they’ll cost you y pounds. For example, item ‘A’ might cost 50 pounds individually, but this week we have a special offer: buy three ‘A’s and they’ll cost you 130. The price and offer table:
Item Price Offer
--------------------------
A 50 3 for 130
B 30 2 for 45
C 20
D 15Our checkout accepts items in any order, so that if we scan a B, an A, and another B, we’ll recognize the two B’s and price them at 45 (for a total price so far of 95).
Inspired from hibri/pair-programming-interview-resources: https://github.com/hibri/pair-programming-interview-resources/wiki/The-Checkout-Kata