The cafex application accepts food and drink items which are available in the menu ( i.e. Cola, Coffee, Cheese Sandwich, Steak Sandwich), it then calculates the overall bill by adding service charge where appropriate.
- Apache Maven
- Java 8
- Lombok (https://projectlombok.org/)
Note : please ensure that Lombok plugin is installed in your IDE before building / running the application.
In order to build the project please ensure that you are in the project root directory (i.e. same level as pom.xml) and execute mvn clean package. This will execute the goals in sequence, so the project will be cleaned first before being packaged up.
mvn clean install
mvn clean install -e -X
mvn clean install -DskipTests -Dmaven.clover.skip=true
mvn clean test
In order to run the app provide it with the list of purchased items (case sensitive) e.g.:
java -jar cafex.jar "Cola" "Coffee" "Cheese Sandwich"
I have tested the project in Eclipse, IntelliJ and ran the 'cafex.jar' through command line. The logic works, this is proven by the JUnit tests.