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 handdrawn functional requirements, and test planTest Case Matrix for both projects. In the flowchart, please include multiple charts if there is more than one method.
import java.util.;
public class Exercise
public static void mainString args
Creating an object of the scanner class to take input from the user
Scanner sc new ScannerSystemin;
Taking the size of the array as an input from the user
System.out.printEnter the size of the list: ;
int size scnextInt;
Creating an array of inputted size
int arr new intsize;
Taking the elements of the array as an input from the user
System.out.printEnter the contents of the list: ;
forint j ;j size;j
int element scnextInt;
arrj element;
Printing the number of elements in the array and the elements of the array
System.out.print;
System.out.printThe array has size integers ;
forint j ;j size;j
System.out.printarrj;
Calling the "isSorted" function to check if the array is sorted in non decreasing order or not
ifisSortedarr
System.out.println
The list is already sorted.";
else
System.out.println
The list is not sorted.";
public static boolean isSortedint array
Iterating through the complete array using a for loop
forint i ;i array.length ;i
If the next element of the array is smaller than the current element of the array, then return false
ifarrayi arrayi
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
