Question: You are contracted to develop a data system for Citywide Taxi Company. The data system includes the taxi number; the number of passengers that taxi

You are contracted to develop a data system for Citywide Taxi Company. The data system includes the taxi number; the number of passengers that taxi served in the shift.

Your C++ program will (with two arrays):

1. Read up to 50 records of data for the taxi number and passenger numbers from the keyboard (provide a method to end the input before reaching 50 records); 4 points.

2. Display the taxi numbers and passenger numbers in a two column format on the screen; 2 points.

3. Sort the list according to passenger numbers; 3 points.

4. Display the list again on the screen (this time sorted). 1 point.

Sample of program execution:

Enter the taxi number:

101

Enter the passengers served today:

89

Do you have more to enter? (yes or no):

y

Enter the taxi number:

102

Enter the passengers served today:

95

Do you have more to enter? (yes or no):

y

Enter the taxi number:

103

Enter the passengers served today:

76

Do you have more to enter? (yes or no):

n

You entered:

Taxi number of passengers

101 89

102 95

103 76

The list according to the passenger number served today:

Taxi number of passengers

103 76

101 89

102 95

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!