Question: Write C++ code for Earthquake data, part 1 and part 2. 3) Earthquake Data, Part 1 Large repositories of recorded measurement data are available on

Write C++ code for Earthquake data, part 1 and part 2.  Write C++ code for Earthquake data, part 1 and part 2.

3) Earthquake Data, Part 1 Large repositories of recorded measurement data are available on the World Wide Web from a wide spectrum of applications such as stock market data, weather climate data, etc. Use your Web browser to view the following URL: http://earthquake.usgs.gov/earthquakes/map/ This site is maintained by the US Geological Service and reports recent earthquake activity around the world If you examine the upper left corner of this web page, you will see a link marked 'download. Select this link and then choose 'CSV" as the file fmat. Now save the downloaded file in your home directory and then use a text editor to examine it. of the file. We will only be The file contains a large interested in the magnitude of the earthquake and the place (the string indicating where the event occurred, not the latitude/longitude). As you examine the file, note that the place is actually two comma separated strings. The first begins with a double-quote and the second ends with another double quote. The "general" location we are interested in is the second of the two strings that make up the place description. that is in the First, write a program that will read the file and output the categories from the first line, along with their rela- tive location in the line: time 1 latitude 2 longitude 3 depth 4 mag 5 magType 6 nst 7 gap 8 dmin 9 rms 10 net 11 id 12 updated 13 place 14 type You should use the getline() function to read the first line of the file and the split function from Stretch 2 to create the value array. Workout 1) Earthquake Data, Part 2 Now, modify your program to print out the magnitude and location of each earthquake in the file. Compare your program results to the actual file data to verify that it works correctly

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!