Write a function speedingFine that returns a double representing the cost of a speeding ticket based on the speed and whether or not the speeding occurred in a school zone. This information is represented by function inputs (parameters) int speed and boolean schoolZone. The function "signature" (its first line, including type, name, and inputs) has been provided for you.

The cost of a ticket is $22.50 for every 5 mph over the speed limit of 30 mph. Note that someone going 10 mph over the speed limit gets the same fine as someone going 12 or 14 mph, since those speeds did not reach a new multiple of 5. That value is then tripled if the speeding was in a school zone.

(1-4 don't need to be clarified.)
(Java is recommended)



Answer :

Other Questions