Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions