Supermarket checkout component with readable API that calculates the total price of a number of items :-implemented by Sudheer Kosuru Business requirements:
· Design and implement supermarket checkout component with readable API that calculates the total price of a number of items.
· Checkout mechanism can scan items and return actual price (is stateful)
· Our goods are priced individually. In addition, some items are multi-priced: "buy n of them, and they’ll cost you y cents"
Item Unit Special
Price Price
A 40 3 for 70
B 10 2 for 15
C 30
D 25
We value:
· simple, elegant code that reads like a narrative – don't overcomplicate
· excellent testing that acts as documentation
· challenging boundaries where necessary
Additional notes:
· use maven or gradle build system
· make task available on the public GitHub
· if in doubt please document your design choice in README file
Pre