Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The goal is to write a complete C++ program to analyze monthly rainfall data. The goal is to write a complete C++ program to analyze

The goal is to write a complete C++ program to analyze monthly rainfall data.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

The goal is to write a complete C++ program to analyze monthly rainfall data. The data we'll use is from Chicago's Midway airport, but the data could be from any location. The file format consists of an information row, followed by N>0 rows of data. For example, here's the contents of the input file midway-1.txt: Chicago Midway Airport 2015 2017 2015 2016 2017 1.23 0.24 0.48 2.94 4.13 4.37 2.25 3.46 4.97 1.59 4.14 5.40 0.65 0.21 3.05 2.50 5.56 1.56 4.95 6.42 1.19 4.22 1.66 1.25 2.65 2.40 4.18 6.27 3.77 2.60 4.23 1.90 0.56 5.98 2.33 0.17 Running/home/ubuntu/workspace/projecte8/main.cpp midway-1.txt Each data row starts with an integer year, followed by 12 real numbers denoting the inches of rainfall for each month (Jan, Feb, .., Dec). The program analyzes this data and outputs the following: chicago-Midway Airport-28152017 Rainfall Analysis Program ** Average by year (inches): 2015: 2.93333 2016: 2.76833 (-) 217: 3.88667 (+) 1. The average rainfall for each year 2. The trend (-,-, --, +, ++) as compared to the previous year 3. The average rainfall for each month (across all years) 4. The maximum rainfall amount and date 5. The minimum rainfall amount and date Trends: -e, 1,1 Average by month (inches): an: 1.51 Feb: 0.95 Mar: 2.57 Apr: 3.98333 May: 4.48667 Jun: 2.84333 An example program execution is shown to the right, analyzing the file midway-1.txt. Notice that the filename is provided byug: 3:92667 at the keyboard. Aug: 3.92667 Sep: 2.24 Oct: 3.93 Nov: 2.71 Dec: 2.27333 Maximum rainfall: 6.42 inches on Aug 2016 Minimum rainfall: 0.17 inches on Dec 2017 Done*

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions