In order to build project, navigate to the root project directory and run
mvn clean package
This will create JAR artefact in target directory, which could be executed with the following command
java -jar receipt-service-1.0.jar "large coffee with extra milk and foamed milk, small coffee with special roast, bacon roll, orange juice"
This application makes the following assumptions:
- The currency used is CHF.
- Only coffee may have extras, and these extras cannot be duplicated.
- Extras can be empty.
- The input is always in lower case.
- Prices are always present for the given product name.
- If input is present, it is considered valid.
- The customer card stamp always has two previously purchased beverage.
- Receipt didn't consist any info about discounts, only final prices