Question: 1. Implement a public method named initialize. It takes a two dimensional square array of integers named array as a parameter. It initializes all of
1. Implement a public method named initialize. It takes a two dimensional square array of integers named
array 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 -1. (For testing use a 4X4 or 5X5 array and have the application print out the array in 2 dimension format.
2. Implement a method named totals that takes a two dimensional integer array named array as a parameter and returns a one dimensional array where each element is the sum of the columns of the input array.
3. A method named vowels that accepts a String array named alpha. The method will return the index of the
String that contains the most vowels. If there is a tie anyone will be good.
4. A method named count that accepts 2 parameters, an array of integers named array and an integer named min. The method will return the number of elements that are greater than min.
5. A method named order that accepts an integer array named digits. The method will print to the screen the both the maximum and minimum values of the array.
6. A method named summit that accepts 2 integer arrays named gamma and delta. If the arrays are the same size the method will return an array of the sum of the corresponding elements. If they are of different sizes the method will return an array of 10 elements where all of the elements are set to -1.
7. A method named border that accepts a two dimensional array of chars named array as a parameter. It initializes all of the elements of the array to x except for the perimeter (first and last column, and first and last row) that is initialized to o.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
