Code Kata #1 - Supermarket Pricing
Taken from Code Kata’s by Dave Thomas The basic premise of this Kata is asking how you would model super market pricing. What is the price of an item? What is the cost? How do you handle price-per-pound? Buy 2 get one free? What’s the value of stock? It’s interesting, and I thought I’d take the time to blog through my thought process. I’d like to iterate over the design and see where it takes me. First task is to represent a product. ...