Question
You are contracted to develop a data system for Citywide Taxi Company. The data system includes the taxi id (such as CTC0001); the number of
You are contracted to develop a data system for Citywide Taxi Company. The data system includes the taxi id (such as CTC0001); 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.
You program may generate the following screen output when executed:
Enter the taxi number:
CTC0001
Enter the passengers served today:
89
Do you have more to enter? (yes or no):
y
Enter the taxi number:
CTC0002
Enter the passengers served today:
95
Do you have more to enter? (yes or no):
y
Enter the taxi number:
CTC0003
Enter the passengers served today:
76
Do you have more to enter? (yes or no):
n
You entered:
Taxi number of passengers
CTC0001 89
CTC0002 95
CTC0003 76
The list according to the passenger number served today:
Taxi number of passengers
CTC0003 76
CTC0001 89
CTC0002 95
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started