Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

computer scienceCreate a scanner object and have it take in the fileReader object youcreated in the previous step. To traverse the file create a while

computer scienceCreate a scanner object and have it take in the fileReader object youcreated in the previous step.
To traverse the file create a while loop that uses scanner.hasNextLine() as the condition.
With this setup, you will now compute the following (Remember to compile and run your code often)
The average temperature
The highest temperature
The lowest temperature
Total number of days where the temperature is above 25
Print out your results
Expected results:
Average Temperature: 23.1C
Highest Temperature: 35.0C
LOwest Temperature: 10.0C
Days above 25.0C:12
image text in transcribed

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

Lectures On Public Economics

Authors: Anthony B. Atkinson, Joseph E. Stiglitz

1st Edition

0691166412, 978-0691166414

Students also viewed these Databases questions