Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

3. How can we use information and communication to generate trust?

Answered: 1 week ago

Question

What is Indian Polity and Governance ?

Answered: 1 week ago