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

Less than 10 MPH

Be Careful

Less than 15 MPH

Drive with caution

Less than 20 MPH

You are driving dangerous

Less than 30 MPH

You are in Danger zone

Greater than or equal to 30 MPH

Display also should specify whether in School or construction zone.

You should have an SpeedLimitApp class which calculates the fine and does the display.

For example

Speed Limit: 45 MPH

Vehicle speed: 57 MPH

Construction or School Zone: No

Total Fine Calculated = $204.00

Display: Drive with Caution.

**********Do this assignment graphically using javafx where the inputs are entered into a graphic box and output which is calculated fine should be exhibited in a different box.************

See ya in court

Court Mandatory

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!