Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 console

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_2

Step: 3

blur-text-image_3

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

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago