Write a Java Program that accomplishes the following tasks: Reads an integer, n, following by .csv file with (x,y) coordinates of n points, storing these values in a two-dimensional array named Points with n rows and n columns. Creates a two-dimensional array with n rows and n columns named distances, with distances[i][j] = distance from points[i] to points [j]. Creates a one-dimensional array of length n named averages, with averages[i] = average of row I of distances. Read in a .csv or excel file, find all the values that share the same coordinates. eg. Find the points where (x,y= (4,5) and print a matrix array of the average of the values at their location
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 1 | 2 | 3 | 4 | 5 |