Question: This assignment will give you practice with functions and vectors. I have given you a starter file called hurricane.cpp . You are free to create

This assignment will give you practice with functions and vectors. I have given you a starter file called hurricane.cpp. You are free to create your solution from scratch. Create a program that will read data from a file called hurricanes.txt. The data will consist of a citys name, wind velocity and amount of rain for the hurricanes that occurred in the United States. The input process will be terminated by the EOF marker. Some cities will have a space in the name. (use the indata.ignore() statement where needed) Have the main function call a function to input the data from the file hurricanes.txt and store the data in 3 vectors, City, Wind, and Rain. The max number of elements is 50. However, the input function will keep track of the number of cities and put that count in the variable numcities. The Main Function should:1.Declare all vectors and variables needed2.Call the ReadData Function to read the data into the vectorsa.Pass the arguments neededb.Open the file hurricanes.txtc.Use a while loop to read data into the vectors until EOF is reachedd.close the file3.Call the SelSort Function to sort all three vectors by city.a.Use the selection sort to sort all three vectors simultaneously using numcities.4.Call the PrintVectors Function that prints the three vectors in tabular form with column headers 5.Call the ViolentWinds Function to print each city where the hurricane was violent. A Hurricane is violent if its windspeed is at least 120 mph. Display the citys name and windspeed with the header Violent Winds6.Call the MajorFlood Function to print each city where the hurricane produced a flood. A flood occurs if its rainfall is at least 3.5 inches. Display the citys name and rainfall windspeed with the header Major Floods7.Call the WindiestCity Function to return the vector position(hipos) of the city with the highest windspeed.8.Call the AverWind Function to return the average wind velocity.9.Call the AverRain Function to return the average rain fall.10.Display the name of the city with the highest winds speed along with its windspeed.

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!