This is much more interesting case study of TDD and how skipping a step ahead can mess you up tremendously.
Problem
Given a list of jerseys with numbered from 1-J, and a list of requests from athlete for a specific jersey number and size, return the maximum number of jerseys that can be given out.
public class TestJerseys
{
[Test]
publi...
]]>
Summary of Zero That Out: Positive integers are provided from input one at a time. Every input that is a 0 ignores the last given input (a series of n 0s means ignore the last series of n inputs). The program should keep track...
]]>I realized doing this post after the code was written is quite difficult, as a lot of the juicy details stuff got refactored away. So please ask me if you don’t understand any section!
Given a bunch of items, their price per item, and a special bulk discount rate: create a system that can add items to your basket and a checkout system that can scan your basket and output the final price, taking the bulk discount rate into consideration. (i.e. item A cost...
]]>