So I'm having a bit of trouble calculating a fee in a class I'm trying to write. One of the methods in this class is used to calculate said fee. The fee depends on how long a car stays in its parking slot.
If it's been there 0-3 hours, its a flat $3 fee. Over 3 hours and it's an additional $1.50 an hour with a maximum charge of $12 per 24hours. There is no limit to the amount of days they can stay...
I have 3 arrays that are holding the date, hour and minute (that has to be rounded to the NEAREST hour) respective of each parking slot. (dayIn, hourIn and minIn) and 3 separate variables that hold the current date, hour and min.
Anyways, my question is how would I go about calculating the fee?