Create a native application without external libs to read a log file and format the result grid as expected.
Piloto Nº Volta Tempo Volta Velocidade média da volta
23:49:08.277 038 – F.MASSA 1 1:02.852 44,275
23:49:10.858 033 – R.BARRICHELLO 1 1:04.352 43,243
23:49:11.075 002 – K.RAIKKONEN 1 1:04.108 43,408
23:49:12.667 023 – M.WEBBER 1 1:04.414 43,202
23:49:30.976 015 – F.ALONSO 1 1:18.456 35,47
23:50:11.447 038 – F.MASSA 2 1:03.170 44,053
23:50:14.860 033 – R.BARRICHELLO 2 1:04.002 43,48
23:50:15.057 002 – K.RAIKKONEN 2 1:03.982 43,493
23:50:17.472 023 – M.WEBBER 2 1:04.805 42,941
23:50:37.987 015 – F.ALONSO 2 1:07.011 41,528
23:51:14.216 038 – F.MASSA 3 1:02.769 44,334
23:51:18.576 033 – R.BARRICHELLO 3 1:03.716 43,675
23:51:19.044 002 – K.RAIKKONEN 3 1:03.987 43,49
23:51:21.759 023 – M.WEBBER 3 1:04.287 43,287
23:51:46.691 015 – F.ALONSO 3 1:08.704 40,504
23:52:01.796 011 – S.VETTEL 1 3:31.315 13,169
23:52:17.003 038 – F.MASS 4 1:02.787 44,321
23:52:22.586 033 – R.BARRICHELLO 4 1:04.010 43,474
23:52:22.120 002 – K.RAIKKONEN 4 1:03.076 44,118
23:52:25.975 023 – M.WEBBER 4 1:04.216 43,335
23:53:06.741 015 – F.ALONSO 4 1:20.050 34,763
23:53:39.660 011 – S.VETTEL 2 1:37.864 28,435
23:54:57.757 011 – S.VETTEL 3 1:18.097 35,633
|-----------------------------------------------------------------------------------------------------|
| POSITION | DRIVER | LAP | TIME | BEST LAP | AVERAGE SPEED |
|-----------------------------------------------------------------------------------------------------|
|01 |038 - F.MASSA | 4 | 04:11.578 | 01:02.769 | 44,246 |
|02 |033 - R.BARRICHELLO | 4 | 04:16.080 (+04.502s) | 01:03.716 | 43,468 |
|03 |002 - K.RAIKKONEN | 4 | 04:15.153 (+03.575s) | 01:03.076 | 43,627 |
|04 |023 - M.WEBBER | 4 | 04:17.722 (+06.144s) | 01:04.216 | 43,191 |
|05 |015 - F.ALONSO | 4 | 04:54.221 (+42.643s) | 01:07.011 | 38,066 |
|NC |011 - S.VETTEL | 3 | DNF | 01:18.097 | 25,746 |
|-----------------------------------------------------------------------------------------------------|
| BEST LAP RACE: 038 - F.MASSA - 01:02.769|
|-----------------------------------------------------------------------------------------------------|
- maven
- JDK 1.8
mvn package
java -jar target/f1app-1.0-SNAPSHOT.jar
There are three diferent types of formatter:
* general (default)
* f1
* laps
Just pass one of these strings after the jar execution e.g.
java -jar target/f1app-1.0-SNAPSHOT.jar f1
java -jar target/f1app-1.0-SNAPSHOT.jar laps