The BusApp is a Gradle-based Java Spring boot application designed to manage Tap ON and Tap OFF actions for bus rides. It processes these actions into trips and calculates fares based on the traveled route.
This app is running:
- Java 1.8
- Spring 2.7.14
To run the BusApp application, you need the following prerequisites:
- Java Development Kit (JDK) 1.8
- Gradle Build Tool
Follow these steps to run the BusApp application:
-
Clone the repository:
git clone https://github.com/HEdmeades/busapp.git cd busapp
-
Choose Java 1.8 as language level and module SDK for project (if not already)
-
Run test cases
- In the test data there was an OFF without a corresponding ON. I have asummed this is to be ignored and the user isnt to be charged and a trip isnt to be created.
- INCOMPLETE trips will not have a finished time in export result
- INCOMPLETE trips will have a duration seconds of startTime to end of day
- ExportCSVService is not implemented generically as my generic bean implementation was formatting the columns uppercase and not in order and I ran out of time to debug
- I couldn't find a pattern in the fair calculation so the values are hard coded based on sectors