Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Ask the user for the name of the master list of data files. a. Open the master l

ID: 645681 • Letter: A

Question

Ask the user for the name of the master list of data files.
     a. Open the master list file
     b. if the file fails to open, print an error message and repeat step 1
     c. For each file name listed in the master file
          i. Open the file
         ii. Read the name of the city from the first line
        iii. Skip the second line (Header) of the data file
        iv. Read an unknown number of lines of data (date, min temp, max temp, avg temp, rainfall)
       v. After reading all the data
           1. Report the largest and smallest Low Temp
           2. Report the largest and smallest High Temp
           3. Report the average average temp
           4. Report the total rainfall
      vi. Close the data file
d. Close the master list file

3 files to be delivered: main, function.cpp, function.h

Sample input files:

Austin, Texas
Date       Min Temp (F) Max Temp (F) Avg Temp (F) Rainfall (in)
1/1/2015 54.00            62.00             60.00            0.00
1/6/2015 39.00            72.00             49.00            0.00
1/7/2015 39.00            69.00             42.00            0.00
1/8/2015 44.00            46.00             44.00            0.17
1/9/2015 38.00            52.00             49.00            0.00
1/15/2015 46.00          49.00             46.00            0.00
1/17/2015 47.00          76.00             53.00             0.00
1/24/2015 39.00          59.00             43.00            0.00
1/25/2015 61.00          66.00             62.00            0.00
1/26/2015 38.00          50.00             50.00            0.00
1/28/2015 53.00          60.00             60.00            0.00
1/30/2015 54.00          69.00             56.00            0.00
1/31/2015 39.00          41.00             39.00            0.19

Sample Output:
Please Enter File Name: cityName.txt
Austin, Texas
Low temperature = (38.00, 61.00)
High temperature = (41.00, 76.00)
Avg temperature = 50.23
Total rain = 0.36

Boulder, Colorado
Low temperature = (-5.00, 20.00)
High temperature = (0.00, 28.00)
Avg temperature = 9.55
Total rain = 0.98

Explanation / Answer

#include<fstream>

#include<iostream>

Using namespace std;

Int main()

{

Char data[100]; int filename;

Cout<<

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote