Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/elven9/kata-potter-tdd

Kata Potter TDD Practice
https://github.com/elven9/kata-potter-tdd

Last synced: 24 days ago
JSON representation

Kata Potter TDD Practice

Awesome Lists containing this project

README

        

# Kata Potter

Potter mania is sweeping the country and parents of teenagers everywhere are queueing
up with shopping baskets overflowing with Potter books. Your mission is to write
a piece of code to calculate the price of any conceivable shopping basket, giving
as big a discount as possible.

## Requirement Spec

- One copy of any of the five books costs 8 EUR
- 5% Discount -> Buy 2 different books
- 10% Discount -> Buy 3 different books
- 20% Discount -> Buy 4 different books
- 25% Discount -> Buy 5 different books

## Edge Cases

- Buy 4 books, 3 with different titles -> 3 book with 10% discount, 1 book with
8 EUR