Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
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 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 operas) 250 251 int max 0; for (int i = 0; i operas, int i) int i, max = 1; for() - 1 + 1;) operas.get (max).getYear()). max) } return max: SH File Sort Database Management Help By Name By Year ht Famo City

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions