Question: Using the provided Java code, please help me create the pseudocode, flowchart ( preferred hand - drawn ) , functional requirements, and test plan /

Using the provided Java code, please help me create the pseudocode, flowchart (preferred hand-drawn), functional requirements, and test plan/Test Case Matrix for both projects. In the flowchart, please include multiple charts if there is more than one method.
import java.util.*;
public class Exercise07_19{
public static void main(String[] args){
//Creating an object of the scanner class to take input from the user
Scanner sc = new Scanner(System.in);
//Taking the size of the array as an input from the user
System.out.print("Enter the size of the list: ");
int size = sc.nextInt();
//Creating an array of inputted size
int []arr = new int[size];
//Taking the elements of the array as an input from the user
System.out.print("Enter the contents of the list: ");
for(int j =0;j < size;j++){
int element = sc.nextInt();
arr[j]= element;
}
//Printing the number of elements in the array and the elements of the array
System.out.print("");
System.out.print("The array has "+ size +" integers ");
for(int j =0;j < size;j++){
System.out.print(arr[j]+"");
}
//Calling the "isSorted" function to check if the array is sorted in non decreasing order or not
if(isSorted(arr)){
System.out.println("
The list is already sorted.");
}
else{
System.out.println("
The list is not sorted.");
}
}
public static boolean isSorted(int[] array){
//Iterating through the complete array using a for loop
for(int i =0;i < array.length -1;i++){
//If the next element of the array is smaller than the current element of the array, then return false
if(array[i+1]< array[i]){
return false;
}
}
//After iterating through the complete array, if all element of the array are in non decreasing order, then return true
return true;
}
}

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!