Question: JAVA Question 2 Write a program that determines the penalty for a driver who is speeding on highway 401. The program should ask the user
Question 2 Write a program that determines the penalty for a driver who is speeding on highway 401. The program should ask the user how fast the driver was going. If the driver is driving less than 10km over the speed limit (100km), the fine is $65. 10-19km over the speed limit, the fine is $120 and the driver gets 2 demerit points. 20-39km over the speed limit, the fine is $240 and 5 demerit points 40-59km the fine is $360 and the driver gets 7 demerit points 160km or over, the driver loses his license on the spot and is given a fine of $520. After determining that the driver was speeding and if they have not yet lost their license, ask the user how many demerit points the driver originally had. When a driver has 12 demerit points they lose their license. Determine if the driver should lose their license given how fast they were driving. Output how many demerit points the driver has after the current infraction. Here are a few sample outputs to illustrate the expected behavior of your program. Note: user input is highlighted in grey. SpeedyFines Calculator How fast was the driver going? 9e The driver was not speeding
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
