Skip to content

jacekpapiniak/jacekpapiniak_shopping_cart

Repository files navigation

Checkout Kata

Based on https://rubygem.me/2014/01/16/shopping-cart-kata/

The problem

Implement the code for a supermarket checkout that calculates the total price of a number of items placed into a basket. Goods are priced individually, however there are weekly special offers for when multiple items are bought. For example “Apples are 50 each or 3 for 130”.

Weekly offers change frequently.

SKU Unit Price Special Offer
A99 50 3 for 130
B15 30 2 for 45
C40 60
T34 99

The checkout accepts the items in any order, so that if we scan a pack of Biscuits (B15), an apple (A99) and another pack of biscuits, we’ll recognise two packs of biscuits and apply the discount of 2 for 45.

Your task

Please fork this repo and implement the above requirements spending no more than 60 minutes. When you've done that please send the url of your solution to your representative..

About

Code for interview

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages