2. Write a complete Java program that provides two methods named sort(list) and filter(list). a. sort(list) accept a list of String type as a parameter. sort the elements ascendingly from a-z using...


Please solve this important.


2. Write a complete Java program that provides two methods named sort(list) and filter(list).<br>a. sort(list)<br>accept a list of String type as a parameter.<br>sort the elements ascendingly from a-z using any of these algorithms (bubble,<br>selection OR insertion).<br>return the list sorted.<br>b. filter(list)<br>remove duplicated values.<br>return the list without duplicates.<br>c. main():<br>follow Sample Output:<br>Sample Output:<br>Enter Size: 5<br>Enter Elements:<br>Ahmed<br>Noor<br>Ali<br>Noor<br>Fahad<br>List: [Ahmed, Noor, Ali, Noor, Fahad]<br>After Sorting: [Ahmed, Ali, Fahad, Noor, Noor]<br>After removing duplicates: [Ahmed, Ali, Fahad, Noor]<br>

Extracted text: 2. Write a complete Java program that provides two methods named sort(list) and filter(list). a. sort(list) accept a list of String type as a parameter. sort the elements ascendingly from a-z using any of these algorithms (bubble, selection OR insertion). return the list sorted. b. filter(list) remove duplicated values. return the list without duplicates. c. main(): follow Sample Output: Sample Output: Enter Size: 5 Enter Elements: Ahmed Noor Ali Noor Fahad List: [Ahmed, Noor, Ali, Noor, Fahad] After Sorting: [Ahmed, Ali, Fahad, Noor, Noor] After removing duplicates: [Ahmed, Ali, Fahad, Noor]

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here