Question: Please help me write the pseudocode, create a flowchart with the appropriate shapes, and a Test Plan / Test Case Matrix for the following Java

Please help me write the pseudocode, create a flowchart with the appropriate shapes, and a Test Plan/Test Case Matrix for the following Java code.
"Write a test program that prompts the user to enter a two-dimensional array and displays the location of the largest element in the array.
If there are more than one largest element, find the location with the smallest row index and then the smallest column index."
import java.util.Scanner;
public class Exercise09_13{
public static void main(String[] args){
// Create a Scanner object for user input
Scanner scanner = new Scanner(System.in);
// Prompt the user to enter the number of rows and columns
System.out.print("Enter the number of rows and columns of the array: ");
int rows = scanner.nextInt();
int columns = scanner.nextInt();
// Create a 2D array based on user input
double[][] array = new double[rows][columns];
// Prompt the user to enter the array elements
System.out.println("Enter the array:");
for (int i =0; i < rows; i++){
for (int j =0; j < columns; j++){
array[i][j]= scanner.nextDouble();
}
}
// Call the locateLargest method to get the location of the largest element
int[] location = locateLargest(array);
// Display the location of the largest element
System.out.println("The location of the largest element is at ("+ location[0]+","+ location[1]+")");
}
public static int[] locateLargest(double[][] a){
int[] location = new int[2];
double largest = a[0][0];
// Find the largest element and its location
for (int i =0; i < a.length; i++){
for (int j =0; j < a[i].length; j++){
if (a[i][j]> largest){
largest = a[i][j];
location[0]= i;
location[1]= j;
}
}
}
return location;
}
}

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!