Question: IN JAVA!!!!!! Write a method that reads each line of the weather.txt file (Provided Below). This file contains data describing the daily temperature of Genovia

IN JAVA!!!!!!

Write a method that reads each line of the weather.txt file (Provided Below). This file contains data describing the daily temperature of Genovia in January 2001.

Calculate and print the average daily temperature. Make sure to catch the IOException and write an exception message.

Note: The weather.txt file needs to be in the same folder as your Java class.

Example

20

40

60

Average: 40

weather.txt file:

22 45 12 10 10 10 70 32 31 31 31 30 20 19 18 17 40 42 42 30 8 8 8 10 22 23 24 20 12 13 13 

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!