Question: 2D Array Java Program Write a Java Program for the following steps(one-by-one) (25 Points): a) The program asks the user to provide the number of
2D Array Java Program Write a Java Program for the following steps(one-by-one) (25 Points): a) The program asks the user to provide the number of rows and columns. 2 Points) b) The program should create a 2D array based on the user given size. (2 Points) c) The program should store random values in range from 50 to 500 within the 2D array and print it. (2 Points) d) The program should then call a method called "findAverage" and pass this 2D array as parameter to this method. (2 Points) e) Inside the method "findAverage", the program should ask the user to enter a valid row number of his/her choice. (i.e., if there are 4 rows, then the user should provide a number in range of 0 to 3 ). (2 Points) f) The method should print the average of values present in the user given row number. (4 points) g) Inside the main method, the program should call another method called "getArray" and pass the 2D array as its parameter. (2 Points) h) Inside the "getArray" method, the program should multiply all odd values present within the 2D array by 2 . (5 Points) i) The program should then return the 2D array back to the main method. (2 Points) j) The main method should print the returned 2D array. (2 Points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
