Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Code using Java. Please show screenshot of code and give \"copy and paste\" code

ID: 3909957 • Letter: C

Question

Code using Java. Please show screenshot of code and give "copy and paste" code.

t a method named setMajor, It takes a two dimensional square array of integers named a 1.I as a parameter. It initializes all of the elements of the array to the sum of their indices except for the major diagonal (upper left to lower right) where each element is initialized to 9·(For testing use a 5X5 array and have the application print out the array in 2 dimension format. 2. See if you can do the same for the minor diagonal (upper right to lower left) named setMinoir.

Explanation / Answer

public static int[][] setMajor(int a[][]){ for(int i = 0;i