Hardware Reference
In-Depth Information
calculate_price() function
In this function the entering time of a car is subtracted from its exiting time to calculate
its total parked time. Some conditions are considered in computing parking cost. For ex-
ample if the entering time is greater than exit time, it means the car exited in a different day
from entrance day. The parking cost is computed according to the following table:
From 1 hour until
3 hours
From 3h un-
til 24h
More than 24
hours
Less than one hour
40 ¢ for entrance cost and one ¢
for each minute
One dollar
3 dollar
6 dollar
Search WWH ::




Custom Search