There is a list of customers, each having
- customer ID
- latitude
- longitude
- name
We need to find all customers within 100KM radius of Dublin office, and order them by their customer ID so that we can send them invitations
Dataset: customers.txt
located in
src/main/resources/customers.txt
User object format
{"latitude": "54.1225", "user_id": 27, "name": "Enid Gallagher", "longitude": "-8.143333"}
- Language Used: Kotlin
- JSON (de)serialization: kotlinx.serialization
- Build System: Gradle
- Java (JDK 8 or above)
- Kotlin (not needed to install separately)
Compile project
./gradlew assemble
Run Program
java -jar build/libs/IntercomGeoDist-1.0-SNAPSHOT.jar
./gradlew check
Run test with coverage report
./gradlew jacocoTestReport
Find test report (open in browser) -
build/jacocoHtml/index.html