Question: New Question: What does it take to send values through these array methods and receive the output? We are supposed to get the largest and
New Question: What does it take to send values through these array methods and receive the output? We are supposed to get the largest and smallest values using the double and int array methods. Can anyone please explain how? ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Initial Requirements: Write methods using the following headers that returns the location of the largest element in the array passed to the method returning a one-dimensional array that contains two location elements.
1. public static int [] locateLargest (double [][] arrayParam)
2. public static int [] locateLargest (int [][] arrayParam)
Then, write methods using the following headers that returns the location of the smallest element in the array passed to the method returning a one-dimensional array that contains two location elements.
public static int [] locateSmallest (double [][] arrayParam)
2. public static int [] locateSmallest (int [][] arrayParam)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Code I have so far: public static int [] locateLargest (double [][] arrayParam) { int arrRes[]=new int[2]; double res=arrayParam[0][0]; for(int i=0;i
public static int [] locateSmallest (double [][] arrayParam) { int arrRes[]=new int[2]; double res=arrayParam[0][0]; for(int i=0;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
