Question: i am trying to sort by name and by year, but it' s not working 4 5 @suppressWarnings (unchecked private void displayOperas() 9 9 int




4 5 @suppressWarnings ("unchecked private void displayOperas() 9 9 int location - operas JLiat.getSelectedIndex(): get index of current opera String operaslist - new String [operan.size(): W Array with name only if (yearJMenuItem. 1.8 Selected()) 0 1 2 4 sort by size using selection sont in descending order and dispaly name and year W/sort by yeats using quick sont in descending order and display Tome and year selectionSort (operas): W quickSort (operas): for(int index 0; index operas.size(): index++) 5 7 8 -9 operaslist[index] - operas.get (index).getName()+"," + operas.get(index).getYear() + "."; > } else //display operos by name on Y 0 "2 2 3 4 15 16 17 8 99 30 22 32 V/sort by opera name using insertion sort and display name only insertionSort (operas): Woort by opera name using toege sort and display name only /merge Sort (opera) for (int index - 0; index operas) int i, j; for (i = 0; i 0 46 operas.get().getName().compareTorgnoreCase (temp.getName()) > 0) operas.get(+1, operas.get()); -- 1 operas.get() +1, temp): public void selectionSort(ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
