Objective: The goal of this assignment is to refresh your memory of 1-dimensional arrays, in preparation for the following lab on multi-dimensional arrays.
Background: To check how climate is changing, CS students are processing records of day-by-day temperatures measured at different locations.
Assignment: Let us assume that the temperatures recorded at each location are placed in a separate file, with the name of the location on the first line, and each day's temperature on a separate line. Your program should read the name of the file from the command line. It will then read the data from the file, put the data into an array, print the name of the location, and compute and print the following information:
Example. Assume that the sensors at the El Paso International Airport location recorded the temperatures 70, 65, 61, 71, and 66. In this case, the input file is as follows:
El Paso International Airport 70 65 61 71 66In this example, the average temperature is
70 + 65 + 61 + 71 + 66 333 ---------------------- = --- = 66.6, 5 5the warmest temperature is 71, the coldest temperature is 61, and if we exclude the extreme values 61 and 71, then the average of the remaining temperatures is
70 + 65 + 66 ------------ = 67.0. 3
Deliverables: Your TA will instruct you.