Skip to content

Supermarket is a tested code kata which contains Checkout class with addItemPrice, addItem, addDiscount, and calculateTotal methods.

Notifications You must be signed in to change notification settings

zomorodiyan/Supermarket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supermarket

Supermarket is a tested code kata which contains Checkout class with the fallowing methodes:

Input methodes

addItemPrice: gets item (string) and price (int) and adds the item and its price to the list of priced items.
addItem: gets item (string) and increments the number of the item by one if its a priced item otherwise throws invalid argument exception
addDiscount: gets item (string), nbrOfItems (int), and discountPrice (int) and adds the discount to the item.

Output method

calculateTotal: calculates and returns total (int).

About

Supermarket is a tested code kata which contains Checkout class with addItemPrice, addItem, addDiscount, and calculateTotal methods.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published