subject

Write a program that uses a two dimensional array to store the highest and lowest temperatures for each month of the calendar year. The temperatures will be entered at the keyboard. This program must output the average high, average low, and highest and lowest temperatures of the year. The results will be printed on the console. The program must include the following methods: a. A method named inputTempForMonth whose purpose is to input a high and a low temperature for a specific month. The month and the array of temperatures will both be passed as input arguments to the method. The method will not have a return value.

b. A method named inputTempForYear whose purpose is to input a high and a low temperature for every month of the year. There are no input arguments for this method, but the method does return a completed multidimensional array of temperatures for the year.

c. A method named calculateAverageHigh whose purpose is to calculate the average high temperature for the year. This method will take the array of temperatures as input and will return the average high temperature for the year.

d. A method named calculateAverageLow whose purpose is to calculate the average low temperature for the year. This method will take the array of temperatures as input and will return the average low temperature for the year.

e. A method named findHighestTemp whose purpose is to return the index value of the highest temperature for the year. If the highest temperature of the year occurs more than once in the year, then the method should return the index of the first month that had the temperature. The method will take the array of temperatures as an input argument and return the index of the highest temperature.

f. A method named findLowestTemp whose purpose is to return the index value of the lowest temperature for the year. If the lowest temperature of the year occurs more than once in the year, then the method should return the index of the first month that had the temperature. The method will take the array of temperatures as an input argument and return the index of the lowest temperature.

g. A main method that uses the previous methods to determine the average high temperature, average low temperature, and highest and lowest temperatures for the year. The main method must print out these average temperatures as well as the month and temperature for the highest and lowest temperatures for the year.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 20:40, cmflores3245
Convert and simplify the following sentences to conjunctive normal form (cnf): (a) (p → (q → r)) → (p → (r → q)) (b) (p ∧ q) → (¬p ↔ q) (c) ((p → q) ∧ ¬q) → ¬p
Answers: 3
image
Computers and Technology, 22.06.2019 18:30, yayamcneal05
Which cultural aspect does this type of song best portray? a german polka dance
Answers: 1
image
Computers and Technology, 23.06.2019 05:00, mariahchaparro08
Which best explains why a digital leader would join a society specializing in technology
Answers: 1
image
Computers and Technology, 24.06.2019 19:50, joejoefofana
How to unblock on chrome book? ?
Answers: 1
You know the right answer?
Write a program that uses a two dimensional array to store the highest and lowest temperatures for e...

Questions in other subjects:

Konu
Mathematics, 09.02.2021 20:30
Konu
Mathematics, 09.02.2021 20:30
Konu
Mathematics, 09.02.2021 20:30