Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java please, and follow instructions carefully. Thanks so much!!! Write a program called Temperatures that will read in a user specified number of temperatures

In java please, and follow instructions carefully. Thanks so much!!!

image text in transcribed

Write a program called Temperatures that will read in a user specified number of temperatures into a double array. Then print the highest, lowest and average temperature. Write five separate methods in addition to the main method one each for readTemps, highestTemp, lowestTemp, averageTemp and printTemps. The printTemps method should bea void method (it returns nothing) and should accept a doublel ] as input. The readTemps method should create and return a double[ ] and does not take any arguments. The other three should accept a doublel ] as input and return a double value. Make sure you test your program using temperatures bpth above and below zero. Temperatures that you output should be formatted to display 2 places past the decimal point. Sample run: Enter the number of temperatures: 7 Please enter 7 temperatures... Enter temperature #1 of 7: 77 Enter temperature #2 of 7: 65 Enter temperature #3 of 7: 69 Enter temperature #4 of 7: 82 Enter temperature #5 of 7: 70 Enter temperature #6 of 7: 57 Enter temperature #7 of 7: 76 The average temperature is 70.86 The highest temperature is 82.00 The lowest temperature is 57.00 The above statistics are based on the following temperatures: Temperature #1: 77.00 Temperature #2: 65.00 Temperature #3: 69.00 Temperature #4 : 82.00 Temperature #5: 7e.ee Temperature #6: 57.00 Temperature #7: 76.00

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

Students also viewed these Databases questions

Question

When is it appropriate to use a root cause analysis

Answered: 1 week ago

Question

How was their resistance overcome?

Answered: 1 week ago