Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package dailyprogrammer.medium.averagespeedcameras;
- import java.io.File;
- public class Main {
- public static void main(String... args) throws Exception {
- File logFile = new File("src/dailyprogrammer/medium/averagespeedcameras/input");
- SpeedCalculator calc = new SpeedCalculator();
- calc.getSpeedingCars(logFile).forEach(pair -> {
- String car = pair.key;
- double speed = pair.value;
- System.out.printf("Vehicle %s broke the speed limit by %s %s.\n", car, String.format("%1$,.2f", speed), calc.getDistString());
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement