6. Speeding Fines Current penalties for individuals caught speeding in Queensland are: Infringement Penalty amount Demerit points Less than 13km/h over the speed limit $177 At least 13km/h but not more than 20km/h over the speed limit $266 More than 20km/h but not more than 30km/h over the speed limit $444 4 More than 30km/h but not more than 40km/h over the speed limit $622 6 More than 40km/h over the speed limit $1,245 8 Note: the way the government website has written this (and we've copied it) is NOT efficient in terms of decision structures. This has been written for each condition to stand alone (if, if, if) but we can tell its mutually exclusive and so know a better tool for the job, don't we? Avoid a 6-month suspension by writing a program to ask for the user's: speed and the speed limit then tell them their fine in dollars (you can ignore the demerit points). After getting the inputs, you will want to calculate the speed over the limit. You do not want to calculate this again and again in each condition. DRY.
