I'm taking computer programming in school and we're doing Java in JGrasp and I'm failing to add a value to a integer I already have defined.
The program is a ticket calculator for speeding
1. All tickets will start with a minimum amount of $75.
2. An additional $6 is charged for every mph over the posted speed limit.
3. If you are traveling over 30mph over the posted speed limit, an additional $160 is charged.
4. If the speeding occurred in a school zone, the cost of the ticket is doubled.
Failing on step 2, and I'm new to java so don't judge my stupidity lol.
speedlimit is the speedlimit of the area,
speed is the speed of the car, and excess is every mile over,
was gonna write something along the lines of speedlimit minus speed is the excess, and add multiplay excess by 6 and add it to my final ticket cost at the end of my program.
sorry if I wrote this badly, I don't know how to explain it and its messy but I've tried writing it like 4 different ways and im confused lol. (We're using some online book and I'm just copying his skeleton for my work if it looks bad)
^ edit for tHE LAST TIME I actually got the riGHT ANSWER FINALLY