Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Specifications
Rutgers parking garage management system is required to take care Rutgers University Paring
needs. The system can keep track of all the cars parked in your garage. For security reason, your
system shall be able to tell the maker, model, color, and license plate number of the cars parked on
this garage. The time a car parked in the garage is a normal distribution with mean at five hours
and standard deviation of 2 hours. Assume this parking garage charges a $4.00 minimum fee to
park for up to three hours. Your garage charges an additional $1.00 per hour for each hour or part
thereof in excess of three hours. The maximum charge for any given 24-hour period is $10.00. For
example, if a car entered the garage at 10th hour 30th minute, and exited 14th hour 10th minute then
the car was parked 3 hours and 40 minutes and can be treated as parked for 4 hours. So it will be
charged $5.00 (first three hours $4.00 and plus $1.00 extra hour). If it exited at 20th hour then it
parked 9 hours 30 minutes. So it will be treated as 10 hours. The charge will be $4.00 + $1.00 x
(10-3) which is $11.00. Because the maximum charge is capped at $10.00, so it will be charged
$10.00. If it exited at 12th hour then it would be counted to park for 1 hour and 30 minutes so the
minimum charge rule will be applied and will be charged for $4.00.
Your program shall output how much to charge a car each time a car exit the garage. In order for
you to facilitate the simulation of time progress, your screen will have an option to allow you to
advance time of thirty (3) minutes. You may assume your garage opens at 6am and closes at
midnight. Note you can only forward time but not backward. A car enters the garage will use the
current time to associate with its ticket. Similar a car exited will use the difference between current
time and the time on its ticket to calculate its charge.
At the end of your simulation, your system will output all information about cars as the following
Time-Entered Maker Model Color License-Number Time-Exited Total-Charge
At the end of all these listings, the system will output how much earned by summing up all charges.
Requirements
You have to write a class call Car which contains all the information you need in order to
implement the system. The class Car contain at least one constructor, more constructors are
allowed if you decide to do so. It also contains getters, and setters if you think it is needed, so that
you can retrieve (get) and store (set) information such as maker, model, color, license plate number,
and ticket into your system.
Create another class call Ticket which represents a ticket of a the car object. A ticket object will
be associated with a car object when a car enters your garage. A ticket can be described by hour
and minute which records the hour and minute when a car enters your garage of a particular day.
Since that we assume the parking time of a car is normal distribution, you also need to store this
information in the car object or in the ticket object. The time it will stay in the garage will be pre-
determined using C++11 normal distribution as mentioned in class. Your TA may give you the
seed to generate random numbers when give test cases. You may use time(0) as seed when you run
your planned test cases.