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) You will declare six objects of Taxi with information included;  There has to be one static variable (in Taxi) to accumulate the number of passengers served by each taxi dispatched;  A taxi is randomly selected when the request is received;  The number of passengers is randomly decided by a function in that object;  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. 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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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.

     



Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY