Skip to content

VieuxChameau/SupermarketCheckout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Supermarket Check Out

Implement a Supermarket checkout that calculates the total price of a number of items.

Some items have multiple prices based on price rules such as:

  • buy 3 (equals) items and pay for 2
  • buy 2 (equals) items for a special price
  • buy 3 (in a set of items) and the cheapest is free
  • for each N (equals) items X, you get K items Y for free

The output required is the receipt with the actual price of every item and the grand total.

You should not spend more than a few hours on this problem.

You may choose any means of accepting input and producing output, including the use of a test harness.

The code should be simple and flexible so that any new rule should be added with the minimum effort.

Required

  • Java 8
  • Maven 3

About

Solution to implement a Supermarket Check Out exercice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages