Question: Part 1 [10 points] Go to this Github URL (Links to an external site.) and download the CSV file named SLCDecember2020Temperatures.csv. The CSV data looks

  • Part 1 [10 points]
    • Go to this Github URL (Links to an external site.) and download the CSV file named SLCDecember2020Temperatures.csv.
    • The CSV data looks like this:
1,40,25 2,41,21 3,39,20 4,37,18 5,40,19 6,42,19 7,43,19 8,42,20 9,39,19 10,36,20 11,35,20 12,32,18 13,31,16 14,28,23 15,35,20 16,43,28 17,38,30 18,35,30 19,42,25 20,42,27 21,53,35 22,49,30 23,32,21 24,37,19 25,36,17 26,33,20 27,39,22 28,35,21 29,33,17 30,33,18 31,34,26
  • Note that the data has 31 rows, one for each day of the week of December 2020 and each row has 3 columns, the first is the day number, the second is the high temperature that day and the third is the low temperature for that day.
  • Create a two-dimensional array of the appropriate size to store the csv data file data.
  • In your program, read the csv data and store it into the two-dimensional array using the File, FileReader and BufferedReader Java API classes.
  • Then use appropriate loops to generate the following report.
  • Display the report shown below on the console,
  • And also write the report to a new file called TemperaturesReport.txt.
  • See the notes below the report example for additional information...
-------------------------------------------------------------- December 2020: Temperatures in Utah -------------------------------------------------------------- Day High Low Variance -------------------------------------------------------------- 1 40 25 15 2 41 21 20 3 39 20 19 4 37 18 19 5 40 19 21 6 42 19 23 7 43 19 24 8 42 20 22 9 39 19 20 10 36 20 16 11 35 20 15 12 32 18 14 13 31 16 15 14 28 23 5 15 35 20 15 16 43 28 15 17 38 30 8 18 35 30 5 19 42 25 17 20 42 27 15 21 53 35 18 22 49 30 19 23 32 21 11 24 37 19 18 25 36 17 19 26 33 20 13 27 39 22 17 28 35 21 14 29 33 17 16 30 33 18 15 31 34 26 8 -------------------------------------------------------------- December Highest Temperature: 12/21: 53 Average Hi: 37.9 December Lowest Temperature: 12/13: 16 Average Lo: 22.0 -------------------------------------------------------------- Graph -------------------------------------------------------------- 1 5 10 15 20 25 30 35 40 45 50 | | | | | | | | | | | -------------------------------------------------------------- 1 Hi ++++++++++++++++++++++++++++++++++++++++ Lo ------------------------- 2 Hi +++++++++++++++++++++++++++++++++++++++++ Lo --------------------- 3 Hi +++++++++++++++++++++++++++++++++++++++ Lo -------------------- 4 Hi +++++++++++++++++++++++++++++++++++++ Lo ------------------ 5 Hi ++++++++++++++++++++++++++++++++++++++++ Lo ------------------- 6 Hi ++++++++++++++++++++++++++++++++++++++++++ Lo ------------------- 7 Hi +++++++++++++++++++++++++++++++++++++++++++ Lo ------------------- 8 Hi ++++++++++++++++++++++++++++++++++++++++++ Lo -------------------- 9 Hi +++++++++++++++++++++++++++++++++++++++ Lo ------------------- 10 Hi ++++++++++++++++++++++++++++++++++++ Lo -------------------- 11 Hi +++++++++++++++++++++++++++++++++++ Lo -------------------- 12 Hi ++++++++++++++++++++++++++++++++ Lo ------------------ 13 Hi +++++++++++++++++++++++++++++++ Lo ---------------- 14 Hi ++++++++++++++++++++++++++++ Lo ----------------------- 15 Hi +++++++++++++++++++++++++++++++++++ Lo -------------------- 16 Hi +++++++++++++++++++++++++++++++++++++++++++ Lo ---------------------------- 17 Hi ++++++++++++++++++++++++++++++++++++++ Lo ------------------------------ 18 Hi +++++++++++++++++++++++++++++++++++ Lo ------------------------------ 19 Hi ++++++++++++++++++++++++++++++++++++++++++ Lo ------------------------- 20 Hi ++++++++++++++++++++++++++++++++++++++++++ Lo --------------------------- 21 Hi +++++++++++++++++++++++++++++++++++++++++++++++++++++ Lo ----------------------------------- 22 Hi +++++++++++++++++++++++++++++++++++++++++++++++++ Lo ------------------------------ 23 Hi ++++++++++++++++++++++++++++++++ Lo --------------------- 24 Hi +++++++++++++++++++++++++++++++++++++ Lo ------------------- 25 Hi ++++++++++++++++++++++++++++++++++++ Lo ----------------- 26 Hi +++++++++++++++++++++++++++++++++ Lo -------------------- 27 Hi +++++++++++++++++++++++++++++++++++++++ Lo ---------------------- 28 Hi +++++++++++++++++++++++++++++++++++ Lo --------------------- 29 Hi +++++++++++++++++++++++++++++++++ Lo ----------------- 30 Hi +++++++++++++++++++++++++++++++++ Lo ------------------ 31 Hi ++++++++++++++++++++++++++++++++++ Lo -------------------------- -------------------------------------------------------------- | | | | | | | | | | | 1 5 10 15 20 25 30 35 40 45 50 --------------------------------------------------------------
  • Report Notes
    • Note that the report is essentially two reports combined to be presented together.
    • The first report lists all days and temperatures in a tabular format.
      • Each row of the tabular report displays the day, high temperature, and low temperature.
      • Each row also shows the variance between the high and low temperatures for that day.
      • At the bottom of the tabular report is a summary that reports the day that had the highest temperature, the highest temperature, and also the average high temperature for the month.
      • The summary at the bottom of the tabular report also reports the day that had the lowest temperature, the lowest temperature, and also the average low temperature for the month.
    • The second report presents a simple graph to visually show the temperatures for each day.
      • There is a scale presented first to aid the user in seeing the magnitude of each day's hi/lo temperatures.
      • Each day contains a number of characters that match the temperature. You can use any character you prefer.
      • The scale is presented again at the bottom of the report as an additional aid to the user.

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!