Assume you are given an input file that contains the daily low temperature readi
ID: 3633964 • Letter: A
Question
Assume you are given an input file that contains the daily low temperature readings for several months in Hypothetical City. The file will have the following format.For each month the file will contain,
the name of the month (string) - the name will be in a random mixture of upper and lower case letters
the number of temperature readings for the month (int) - the maximum value of this number will be the number of days in the month
temperature readings for the month (double)
PROGRAM DESCRIPTION
Design a C++ program that will
interactively prompt the user for the name of the input file and read it
use an input filestream variable to open the file for reading
interactively prompt the user for the name of the output file and read it
use an output filestream variable to open the file for writing - all remaining output must be written to this file
display your name, section #, and assignment #
read and process the data for each month
display the name of the month - with the first letter capitalized and the remaining letters in lower case along with a descriptive label
determine and display the highest and lowest readings for the month
determine and display the average temperature for the month
determine and display the median low temperature (will require sorting the temperatures - use bubblesort)
determine and display the standard deviation of the temperatures for the month
determine and display the number of days when the temperature was within 1 standard deviation of the average (between average - standard deviation/2 and average + standard deviation/2)
OUTPUT REQUIREMENTS
All numeric values should be appropriately labelled.
All non-integer numeric values should be displayed with 1 digit to the right of the decimal.
The names of months must be displayed with the first letter capitalized and the remaining letters in lower case.
There should be at least one blank line between the output for each month.
COMPUTING AVERAGE, VARIANCE, STANDARD DEVIATION, AND MEDIAN
If n = # of temperature readings, and datai = the ith temperature reading,
The median value of a sorted list of numbers is the middle value. If the number of values in the list is even, the median is the average (mean) of the 2 middle values.
IMPORTANT REQUIREMENTS - Failure to adhere to the following requirements will result in major point deductions.
Temperatures must be read into an array.
Declare a constant for the size of the array (31 is the maximum number of elements).
The design of the program must use functions to modularize the code. Try to develop a function for each task to be performed.
Make sure the last line of your input file is terminated with a linefeed.
No global variables may be used in the program.
Use parameters to pass values between functions.
Use an ifstream type variable to represent the input file and an ofstream type variable for the output file.
The program may only read the content of the file once.