Plz Help!

closed account (y86MoG1T)
http://www.chegg.com/homework-help/questions-and-answers/write-c-program-simulates-parking-meter-within-parking-deck-program-start-reading-time-car-q6963833

Write a C++ program that simulates a parking meter within the parking deck. The program will start by reading in the time a car arrives in the parking deck. It will then ask you what time the car left the parking deck. You should then calculate the time that has passed between issuing the time ticket and the time the car left. Lastly, you will use this information to determine how much the person needs to pay upon leaving the deck. The rates are in the table below. Please read through all of the notes below!

You should write a single function for each of the following things:

Reading in the arrival times and departure times

Calculate the passage of time

Determine how much the driver needs to pay

Print out the receipt for the driver, including his arrival and departure times, time in the deck, and how much he owes.

Notes:

Time should be handled in the 24 hour format for simplicity. In addition, you should have the user input the hours, then input the minutes as two separate variables. Please have the user enter hours ranging from 0 to 23, and minutes ranging from 0 to 59.

You may assume that the parking deck is open 24/7 for simplicity. You do not need to worry about times the deck closes for this project.

If the driver has a special parking pass, please enter the time of 99 for the hour and 99 for the minutes when entering the deck. This should be used as a code for the system to know that this person has a special parking pass.

If the drive has lost their ticket, please input 55 for the hour and 55 for the minutes when exiting the

deck. This will prompt the system to handle the payments without a ticketing stub.

Time in Parking Deck

Rate in Dollars ($)

Less than 30 minutes

3.00

[30 Minutes – 1 Hour)

5.00

[1 Hour – 2 Hours )

10.00

[2 Hours – 3 Hours )

15.00

[3 Hours – 4 Hours )

30.00

Each half hour over four hours

30.00 + 5.00 per additional half hour

[12 Hours – ? Hours )

Error prints out, see notes above.

Lost ticket

110.00

Special Parking Pass

5.00
Please note, that this is not a homework site.
We won't do your homework for you.
The purpose of homework is that you learn by doing.
However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.


We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
I recommend starting with this:
1
2
3
4
5
6
7
8
9
10
#include iostream

using namespace std;

int main()
{
cout << "Hello World!" << endl;

return 0;
}
Topic archived. No new replies allowed.