Menu

Hospital Desires Computerize Daily Parking Activity Parking Opens Doors 8 Till 8 Pm Theref Q43843376

A hospital desires to computerize its daily parking activity. The parking opens its doors from 8 AM till 8 PM. Therefore, theA hospital desires to computerize its daily parking activity. The parking opens its doors from 8 AM till 8 PM. Therefore, they bought a device to issue cards, at the entrance gate upon the visitor request, showing the arrival time. Upon leaving the parking the same card is inserted again in the same device by an employee at the exit door in order to send as input both the arrival and the leaving time to the computer. You are asked to write a C+ program that accepts as input the arrival time and leaving time as being two float numbers (for example, if the arrival time is 12:30, it will be inputted as 12.30 and using the built in function: floor(12.30) will result in the float value 12.0 on the other hand, if the departure time is 4:42, it will be inputted as 4.42 and using the built in function: ceil(4.42) will result in the float value 5.0 since any fraction of an hour will be charged as a full hour). These two floats are used to calculate the time spent inside the parking and to output the amount due with an additional 10% VAT tax. The rates are fixed as follows $5 for the first three hours and $2 for each additional hour. Your program must loop as long as the cahier wants to and must display at the end of the day the amount collected from all visitors. Show transcribed image text A hospital desires to computerize its daily parking activity. The parking opens its doors from 8 AM till 8 PM. Therefore, they bought a device to issue cards, at the entrance gate upon the visitor request, showing the arrival time. Upon leaving the parking the same card is inserted again in the same device by an employee at the exit door in order to send as input both the arrival and the leaving time to the computer. You are asked to write a C+ program that accepts as input the arrival time and leaving time as being two float numbers (for example, if the arrival time is 12:30, it will be inputted as 12.30 and using the built in function: floor(12.30) will result in the float value 12.0 on the other hand, if the departure time is 4:42, it will be inputted as 4.42 and using the built in function: ceil(4.42) will result in the float value 5.0 since any fraction of an hour will be charged as a full hour). These two floats are used to calculate the time spent inside the parking and to output the amount due with an additional 10% VAT tax. The rates are fixed as follows $5 for the first three hours and $2 for each additional hour. Your program must loop as long as the cahier wants to and must display at the end of the day the amount collected from all visitors.

Expert Answer


Answer to A hospital desires to computerize its daily parking activity. The parking opens its doors from 8 AM till 8 PM. Therefore…

OR