Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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

Creative Commons License
This work by Damien Pollet is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.