You are contracted by Citywide Taxi Company (CTC) to develop a taxi dispatcher system in C++. In this system, the operator receives a taxi request (you can write the code to ask if there is a request for the taxi), randomly dispatch a taxi (out of six taxis) to pick up the passenger(s). The taxi dispatched will determine how many passages it picked up and add this piece of information in the dispatch system (initially, the number of passengers for each taxi was zero at the beginning of the shift). When there is no more service needed, the dispatch will display the total number of passengers the entire company served and by each taxi during that shift. (You cannot use global variables)
Sample output of the program:
Welcome to CTC.
Do you need a taxi?
Y
Taxi CTC0001 a red Toyota Camry driven by Ted will pick you up in a few minutes. (Taxi CTC0001 determined that there were 3 passengers)
Taxi CTC0004 a black Ford Escape driven by Ron will pick you up in a few minutes. (Taxi CTC0004 determined that there were 2 passengers)
Taxi CTC0001 a red Toyota Camry driven by Ted will pick you up in a few minutes. (Taxi CTC0001 determined that there were 1 passengers)
N
CTC served a total of 6 passengers today.
Ted served 4 passengers.
Ron served 2 passengers.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here