This is a home assignment for recruitment candidates to Springworks.
Peter Griffin is a customer with Risky Insurances Inc. He pays his insurance fee based on how well he can stick to the speed limits while driving.
Peter's car has reported Waypoints from a trip (e.g. where it has driven). The following data is known for each Waypoint:
- latitude (degrees)
- longitude (degrees)
- speed (meters per second)
- speed_limit (meters per second)
- timestamp (ISO 8601 date-time)
The data for Peter's Waypoints needs to be organized in these categories, to make it possible to decide his insurance fee:
- Distance Speeding
- Duration Speeding
- Total Distance
- Total Duration
Write a program that reads the data from waypoints.json
and categorizes it as per above.
Preferred languages in solution
- Typescript
- Javascript
- Java
- Swift
- C#
Submit the resulting source code for the solution, with tests to prove result, to a Github repository and share it with your contact person at Springworks.
Good luck!
๐
- Clone repository:
git clone https://github.com/Nasimmhn/waypoint-challenge-by-nasim.git
- Go to folder:
cd waypoint-challenge-by-nasim
- Install dependencies:
npm install
- Run tests:
npm run test