Turn Part 1 May Use Computer Complete Following Program Also Canyou Re Book Notes Necessar Q13737387

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 canyou’re 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 then 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 methods. One methods is named 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: read Data 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 double[24]; readData(temp); max = Max Array (temp);//add code to print out the daily average temperature System.out.println(“highest value in the array is “+ max +”nAverage daily tem:” + average);//add code to print out the hour which has the highest temperature of the day} define two methods to compete the programShow transcribed image text

"We Offer Paper Writing Services on all Disciplines, Make an Order Now and we will be Glad to Help"
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.