import java.util.*; class TestClass{ public static void main(String[] args){ final int MAXSIZE = 10; int[]myArray = new int[MAXSIZE]; ArrayOperations arrOp = new ArrayOperations(MAXSIZE); arrOp.populate(myArray); Scanner scanner = new Scanner(System.in); while(true){ System.out.println("\nArray Operations Menu:"); System.out.println("1. Add"); System.out.println("2. Maximum"); System.out.println("3. Sort"); System.out.println("4. Insert"); System.out.println("5. Delete"); System.out.println("6. Search"); System.out.println("7. Quit"); System.out.println("Enter your choice (1-8);"); int choice = scanner.nextInt(); switch(choice){ case 1: arrOp.add(myArray); appOp.print(myArray); break; /*case 2: int min = arrOp.getMin(myArray); System.out.print("Minimum: " + min); */ case 2: int max = arrOp.getMax(myArray); System.out.print("Maximum: " + max); break; case 3: arrOp.add(myArray); appOp.print(myArray); break; case 4: System.out.println("Insert Menu: "); System.out.println("1. Insert at Start"); System.out.println("2. Insert at Middle"); System.out.println("3. Insert at End"); System.out.println("Enter you choice: "); int insertChoice = scanner.nextInt(); switch (insertChoice) { case 1: arrOp.insertStart(myArray); arrOp.print(myArray); break; case 2: arrOp.insertMiddle(myArray); arrOp.print(myArray); break; case 3: arrOp.insertEnd(myArray); arrOp.print(myArray); break; default: System.out.println("Invalid Choice for insertion."); } break; case 5: arrOp.delete(myArray); appOp.print(myArray); break; case 6: arrOp.search(myArray); break; /* case 8: Arrays.sort(myArray); */ case 7: System.out.println("Exiting Program"); scanner.close(); System.exit(0); default: System.out.printlin("├Ćnvalid choice. Please enter a valid Option."); } } } }