Question: Lab 0 9 - Sorting a Large Data Set Assume the file called c / temp / WORLDTEMP . TXT holds the ambient temperature (
Lab Sorting a "Large" Data Set
Assume the file called ctempWORLDTEMPTXT holds the ambient temperature simultaneously recorded of some cities around the globe. A small sample is provided below... and many more similar lines followl
For instance, the temperature in Acapulco was degrees, and in Abidjan, it was degrees.
In this project, our first goal is to read the disk data and store its contents on two parallel vectors called vcity and vtemp. Write a function called makeDatabase to read the disk file and return two parallel vectors listing the cities and their recorded temperatures. The header follows.
Then, you need to sort the dataset so the vectors will appear in asofnding order of temperatures. Please observe that the association between each city and its corresponding temperature must be maintained. Write a function implementing Selection Sort to complete this step Chapter
void selectionSortvector$& vtemp, int count& vcity, const vector$& vtemp, int count
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
