Question: In this lab, we are going to build a two-dimensional array in which we will store double values. We will prompt the user to enter

 In this lab, we are going to build a two-dimensional array
in which we will store double values. We will prompt the user
to enter the size of the array, then prompt the user to

In this lab, we are going to build a two-dimensional array in which we will store double values. We will prompt the user to enter the size of the array, then prompt the user to enter the values that will be stored in each element of the array. We will then create a method, locateLargest, to search find the element that has the largest value in the array. This method will return a single-dimensional array that indicates the xy coordinates of the element with the largest value. 1 Create an application called FindElement in netbeans. This application will need a number of parameters: Scanner class variable, called keyboard, for inputting information Integer variables, called numberOfRows and numberOfColumns, for storing the dimensions of the array Two dimensional array of double values, called arrayElements, which is the two dimensional array . This is a reference to a two dimensional array, which will not be created at this time. will be null, since it is not pointing to anywhere. There reference One dimensional array of two integer values. This array will contain the row and column of the location in the array that has the largest value 2 The user will determine the size of the 2-dimensional array that they want to create. Prompt the user to enter the dimensions of the array, read the dimensions from the keyboard and store them into the variables numberOfRows and numberOfColumns. You will need to allocate memory for the two-dimensional double array using the new command. This will create memory and store the reference value into the variable arrayElements. 3 When you create an array, you need to allocate memory for it by the following command. By using new the computer will allocates space for the array and store the memory location of the array into the memory reference, which is stored in the arrayElements variable. For Example: if the user responds with an array of 3 rows and 4 columns, it will correspond to the following: arrayElements 1 2 13 column row[0] [ ][b][S][g] When we want to reference the location of an array, we use arrayElements, along with the row and column for the specified location. arrayElements [01 t0 references location 'a arrayElements[0] [1 references location 'b' arrayElements[0][2] references location c". arrayElements[0) 131 references location 'd' arrayElements[1] [0] references location e". arrayElements f1) 1 references location 'E arrayElements[11 121 references location 'g arrayElements[1) 13 references location 'h arrayElements [(2) 0 references location ' arrayElements [2] [1 references location 'j' arrayElements [21 121 references location ' arrayElements[2) 13 references location ' The application will now prompt the user to enter the values of each element of the array. know the size of the array until the user enters the desired dimensions, you must use multiple loops to properly read the value for each. Enter the number of rows of the desired array2 Enter the number of columns of the desired array: 4 Enter the Value for Row t0l. Column [o: 12 4 Since you don't

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!