Write a java program that uses a two-dimensional array


Write a Java program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. The program should output the average high,average low, and highest and lowest temperatures of the year. Your program must consist of the following methods:

getData- this method reads and stores the data in the two-dimensional array.

averageHigh- This method calculates and returns the average high temperature of the year.

averageLow- This method calculates and returns the average low temperature of the year.

indexHighTemp- This method returns the index of the highest temperatures in the array

indexLowTemp- This method returns the index of the lowest temperature of the array.

For this problem, you should provide two options for the user:
(1) To read data (i.e. the pair of input numbers) from a file, and then send results to a file
(2) To read data from the command line, and display results on the screen
(3) These options should be provided as a GUI dialog box, for example using the JOptionPane class.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a java program that uses a two-dimensional array
Reference No:- TGS0142886

Expected delivery within 24 Hours