Liam Hayes Intercom take home test submitted March 14th, 2019
The program reads a list of customers in JSON format from a text file. Then calculates the customers distance from the Intercom Dublin office. Finally, it prints the list of customers within 100km of the office in ascending order based on the user id.
Run the program with Maven:
- mvn clean install
- mvn exec:java -D"exec.mainClass"="com.liamhayes.intercom.Driver"
11:58:02.690 [main] INFO com.liamhayes.intercom.CustomerAnalyser - Customers within 100km from Intercom Office: 11:58:02.694 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 4 Ian Kehoe 11:58:02.694 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 5 Nora Dempsey 11:58:02.694 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 6 Theresa Enright 11:58:02.694 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 8 Eoin Ahearn 11:58:02.694 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 11 Richard Finnegan 11:58:02.694 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 12 Christina McArdle 11:58:02.694 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 13 Olive Ahearn 11:58:02.694 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 15 Michael Ahearn 11:58:02.695 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 17 Patricia Cahill 11:58:02.695 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 23 Eoin Gallagher 11:58:02.695 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 24 Rose Enright 11:58:02.695 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 26 Stephen McArdle 11:58:02.695 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 29 Oliver Ahearn 11:58:02.695 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 30 Nick Enright 11:58:02.695 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 31 Alan Behan 11:58:02.695 [main] INFO com.liamhayes.intercom.CustomerAnalyser - 39 Lisa Ahearn