Turn Part 1 May Use Computer Complete Following Program Also Use Book Notes Necessary Prin Q13737347

After you turn in the Part 1, you may use computerAfter you turn in the Part 1, you may use computer to complete the following program. You also can use your book or notes if necessary. Print out java file. Write a program that ask user to enter hourly temperature for a day (24 hours). The program the will print out average temperature of the day and the hour which has the highest temperature. Your program must include two methods that are defined to work with the given main method One methods is names as readData which will read hourly temperature into an array. Another method is named as MaxArray which will take an array as argument and return the highest element of the array. You need to do: Define method: readData Define method: MaxArray Add other code of the given main method to ensure the program perform correctly Warning: You can only ADD code into the main method. DONOT change the given code, class Arraydata{ public static void main(String [] arg) { double temp[], max, average; temp = new doubIe[24]; readData(temp); max = MaxArray(temp); add code to print out the daily average temperature tem.out.println(“highest value in the array is “+ max +”nAverage daily temperature average); add code to print out the hour which has the highest temperature of the day fine two methods to compete the programShow transcribed image text After you turn in the Part 1, you may use computer to complete the following program. You also can use your book or notes if necessary. Print out java file. Write a program that ask user to enter hourly temperature for a day (24 hours). The program the will print out average temperature of the day and the hour which has the highest temperature. Your program must include two methods that are defined to work with the given main method One methods is names as readData which will read hourly temperature into an array. Another method is named as MaxArray which will take an array as argument and return the highest element of the array. You need to do: Define method: readData Define method: MaxArray Add other code of the given main method to ensure the program perform correctly Warning: You can only ADD code into the main method. DONOT change the given code, class Arraydata{ public static void main(String [] arg) { double temp[], max, average; temp = new doubIe[24]; readData(temp); max = MaxArray(temp); add code to print out the daily average temperature tem.out.println(“highest value in the array is “+ max +”nAverage daily temperature average); add code to print out the hour which has the highest temperature of the day fine two methods to compete the program

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *