public static int getLowestInColumnIndex(double[] [] data, int col){ double min =data (0] [col] ; int location = -1; for(int i =0; i= 0 && coldata[i] [col]) { min = data[i] [col); location = i; return location; public static int getLowestInRowIndex(double[][] data, int row) { double min = data[row] [0]; int location = 0; for(int col = 1; coldata(row] [col]) { location = col; return location;

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter14: Files And Streams
Section: Chapter Questions
Problem 17RQ
icon
Related questions
Question

Ok so I have been working on these two methods( I put my code in the screen shots) getLowestColumnINdex and getLowestRowIndex

1.

getLowestInColumnIndex

public static int getLowestInColumnIndex(double[][] data,

int col)

Returns the index of the smallest element of the selected column in the two dimensional array index 0 refers to the first column. If a row in the two dimensional array doesn't have this column index, it is not an error, it doesn't participate in this method

2.

getLowestInRowIndex

public static int getLowestInRowIndex(double[][] data,

int row)

Returns the index of the smallest element of the selected row in the two dimensional array index 0 refers to the first row.

 

public static int getLowestInColumnIndex(double[] [] data, int col){
double min =data (0] [col] ;
int location = -1;
for(int i =0; i<data. length; i++) {
if(col>= 0 && col<data[i].length)
if(min>data[i] [col]) {
min = data[i] [col);
location = i;
return location;
Transcribed Image Text:public static int getLowestInColumnIndex(double[] [] data, int col){ double min =data (0] [col] ; int location = -1; for(int i =0; i<data. length; i++) { if(col>= 0 && col<data[i].length) if(min>data[i] [col]) { min = data[i] [col); location = i; return location;
public static int getLowestInRowIndex(double[][] data, int row) {
double min = data[row] [0];
int location = 0;
for(int col = 1; col<data[row]. length; col++) {
if(min>data(row] [col]) {
location = col;
return location;
Transcribed Image Text:public static int getLowestInRowIndex(double[][] data, int row) { double min = data[row] [0]; int location = 0; for(int col = 1; col<data[row]. length; col++) { if(min>data(row] [col]) { location = col; return location;
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,