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...


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)



  1. You will declare six objects of Taxi with information included;

  2. There has to be one static variable (in Taxi) to accumulate the number of passengers served by each taxi dispatched;

  3. A taxi is randomly selected when the request is received;

  4. The number of passengers is randomly decided by a function in that object;

  5. Your program will display the total number of passengers served by the entire company and by each taxi in that shift before ending the program.

  6. with private member variable( taxi Id, driver, model, maker, no. Of passenger, color)


    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)



    Do you need a taxi?



    Y



    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)



    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 1 passengers)



    Do you need a taxi?



    N






    CTC served a total of 6 passengers today.



    Ted served 4 passengers.



    Ron served 2 passengers.








Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here