Write a program that creates a two-dimensional 2d array


Program: Write a program that creates a two-dimensional (2D) array initialized with test data (for instance, use Random method to prepare an array of integers).

Write the given functions and demonstrate each of them by calling each of them from Main and showing results on the console:

- DisplayArray

This function accepts a 2D array as argument and prints out to console its contents (displayed as a 2D grid of numbers).

- GetTotal

This function accepts a 2D array as argument and returns the total sum of all values in the array.

- GetHighestInRow

This function accepts two arguments: the first one is a 2D array, and the second one is an integer that indicates the index (subscript) of a row in the array. The function then returns the highest value in the specified row of the array.

- GetColumnTotal

This function accepts two arguments: the first one is a 2D array, and the second one is an integer that indicates the index (subscript) of a column in the array.

- Thefunction then returns the total sum of the values in the specified column of the array.

You have to implement all these function in a program and provide the code.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a program that creates a two-dimensional 2d array
Reference No:- TGS0964622

Expected delivery within 24 Hours