Question: _____________________________________________________________________________ ArrayPlay.java : import java.util.*; /* * This program checks if an array is sorted. * An unsorted array is sorted in ascending order. *

 _____________________________________________________________________________ ArrayPlay.java : import java.util.*; /* * This program checks if

_____________________________________________________________________________

ArrayPlay.java :

import java.util.*; /* * This program checks if an array is sorted. * An unsorted array is sorted in ascending order. * An array in ascending order is left unchanged. * An array in descending order is reversed. * * @creator gdt * @created 02017.12.15 * @assignment implement the checkIfSorted() * and reverseArray() methods */ public class ArrayPlay { // checkIfSorted() return values... private static final int UNSORTED = 0; private static final int ASCENDING = 1; private static final int DESCENDING = 2; public static void main(String[] argv) { int[][] data = { { 7, 7, 3, 9, 0, 5, 6 }, { 9, 8, 8, 5, 3, 0 }, { 1, 5, 6, 6, 6, 7, 9 }, { 1, 9, 3, 5, 2, 7, 3, 5 }, { 0 }, { 1, 2 }, { 3, 2, 1 }, { 5, 5, 5, 5, 5 }, }; for (int i = 0; i  

_____________________________________________________________________________

Desired outcome in plain text:

[7,7,3,9,0,5,6] (not sorted) [0,3,5,6,7,7,9] [9,8,8,5,3,0] (descending sorted order) [0,3,5,8,8,9] [1,5,6,6,6,7,9] (ascending sorted order) [1,9,3,5,2,7,3,5] (not sorted) [1,2,3,3,5,5,7,9] [0] (ascending sorted order) [1,2] (ascending sorted order) [3,2,1] (descending sorted order) [1,2,3] [5,5,5,5,5] (ascending sorted order) 
Specification Copy the program ArrayPlay.iava to your computer and implement the methods named checklfSorted() and reverse(). The TBI (To Be Implemented) method comment blocks document what the methods do The output of the program must match the following [7,7,3,9,0,5,6] (not sorted) [0,3,5,6,7,7,91 [9,8,8,5,3,0] (descending sorted order) [0,3,5,8,8,9] [1,5,6,6,6,7,9 (ascending sorted order) [1,9,3,5,2,7,3,5] (not sorted) [1,2,3,3,5,5,7,9] [0 (ascending sorted order) [1,2 (ascending sorted order) [3,2,1] (descending sorted order) [1,2,3] [5,5,5,5,5] (ascending sorted order)

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!