Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in eclipse Consider the selection algorithm we presented in class (and in the textbook in section 14.1). That algorithm sorts an array of integers in
in eclipse
Consider the selection algorithm we presented in class (and in the textbook in section 14.1). That algorithm sorts an array of integers in ascending order (smallest rightarrow biggest). Re-implement and Modify the SelectionSorter class' sort algorithm to sort an array of integers in descending order (biggest rightarrow smallest) You must use and not modify the Provided SelectionSortDemo java and ArrayUtil.java files in the Canvas Assignment page. That is, we will be using those files to run your SelectionSort, so you should too 3 points - Correctness of algorithm 2 points - Comments, variable, and code quality Create a class Person that implements the Comparable interface and has a single String instance variable, name. Compare persons by their names In the main of Person, ask the user to input ten names to the console and, from that, generate ten Person objects. Place those objects in an ArrayList or other collection. Sort them using Collections. Sort(list). Once that is complete, determine, and output the first AND last person in that list and print those to the consoleStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started