Kata09: Back to the Checkout - CodeKata
This week, let's implement the code for 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 cents.
https://gist.github.com/Horsed/9482746
http://blog.codosaur.us/2010/09/code-kata-nine-supermarket-checkout.html
I chose to use the Strategy Pattern.
http://blog.codosaur.us/2010/11/code-kata-nine-supermarket-checkout.html
http://www.carlopescio.com/2011/10/youre-solving-wrong-problem.html
https://github.com/CallumJFraser/Katas/tree/master/C%23/Checkout/Kata09
Read full article from Kata09: Back to the Checkout - CodeKata
This week, let's implement the code for 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 cents.
https://gist.github.com/Horsed/9482746
http://blog.codosaur.us/2010/09/code-kata-nine-supermarket-checkout.html
I chose to use the Strategy Pattern.
http://blog.codosaur.us/2010/11/code-kata-nine-supermarket-checkout.html
http://www.carlopescio.com/2011/10/youre-solving-wrong-problem.html
https://github.com/CallumJFraser/Katas/tree/master/C%23/Checkout/Kata09
Read full article from Kata09: Back to the Checkout - CodeKata