Question: create a Word document that contains the pseudocode, flowchart, and test plan for this java program. NB: Flowchart must be the actual diagram not sketch.

create a Word document that contains the pseudocode, flowchart, and test plan for this java program. NB: Flowchart must be the actual diagram not sketch.
public class Exercise07_19{
public static void main(String[] args){
java.util.Scanner input = new java.util.Scanner(System.in);
// Enter values for list1
System.out.print("Enter the size of the list: ");
int size = input.nextInt();
System.out.print("Enter the contents of the list: ");
int[] list = new int[size];
for (int i =0; i < list.length; i++)
list[i]= input.nextInt();
System.out.print("The list has "+ size +" integers ");
for (int i =0; i < list.length; i++)
System.out.print(list[i]+"");
if (isSorted(list))
System.out.println("
The list is already sorted");
else
System.out.println("
The list is not sorted");
}
public static boolean isSorted(int[] list){
for (int i =0; i < list.length -1; i++){
if (list[i]> list[i +1]){
return false;
}
}
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!