Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cdlm/kata-shoppingcart
Shopping cart and pricing policies, as an OO design & Java programming exercise.
https://github.com/cdlm/kata-shoppingcart
Last synced: 5 days ago
JSON representation
Shopping cart and pricing policies, as an OO design & Java programming exercise.
- Host: GitHub
- URL: https://github.com/cdlm/kata-shoppingcart
- Owner: cdlm
- Created: 2014-02-25T15:38:08.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-04-04T18:30:47.000Z (over 7 years ago)
- Last Synced: 2024-10-31T07:05:07.581Z (about 2 months ago)
- Language: Java
- Size: 26.4 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# Java kata: shopping cart & item pricing policies
This kata models the checkout price calculation of a shop (either an online shop or a physical one, at the cash register).
- **Items** represent goods that can be placed in the cart.
- A **cart** contains a number of items, and can compute the total price of its contents.
There is no notion of inventory or of physical instances of products: a given item represents the general product, not the actual physical instance of that product.
Therefore, to represent the purchase of several instances of a product, the corresponding item object will be added that many times to the cart.- Cart items can either be actual **products** with a fixed unit price, or products with a **pricing policy** attached.
Pricing policies influence the asked price for the whole cart, like special offers, promotions, etc.### License
This work by Damien Pollet is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.