Question: GUI Java Computer Programming: The fines for Speeding in one of the counties in Florida is given in the following table. MPH Over Speed Limit
GUI Java Computer Programming:
The fines for Speeding in one of the counties in Florida is given in the following table.
| MPH Over Speed Limit | Fine | ||||||||||
| Less than 10 MPH | $129.00 | ||||||||||
| Less than 15 MPH | $204.00 | ||||||||||
| Less than 20 MPH | $254.00 | ||||||||||
| Less than 30 MPH | $279.00 | ||||||||||
| Greater than or equal to 30 MPH
If you speed in school or construction zone your fine can be doubled. Write a Java program to calculate the speeding fine. Create a Class with YourLastNameSpeedLimit The class variables are: int speedLimit //(Speed Limit of the zone) int speed // ( Speed of the vehicle) booleanl CorSZone // Whether Construction or School Zone
The class should have a constructor where you can pass in the speed Limit, speed of the vehicle and the Boolean whether its a construction or school zone.
The class should have two methods calculateFine() // which calculates the fine using the if - else if - else loop displaySpeeds() //Which should print out the following.using the switch and case
| Court Mandatory
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
