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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started