Question: written in java. Example 1 (using an ArrayList of Strings to hold each input line) :: List info = new ArrayList (); info.add(Jones 14); info.add(Abrams

written in java.
Example 1 (using an ArrayList of Strings to hold each input line) ::
List
info.add("Jones 14"); info.add("Abrams 15"); info.add("Smith 19"); info.add("Jones 9");
Example 2 (using two adjacent Arrays) ::
String[] names = {"Jones", "Abrams", "Smith", "Jones", ...}; int[] ages = {14, 15, 19, 9, ...};
Project... Multiple Key Sorting Create a text file named Names_ages.txt with the following content: Jones 14 Abrams 15 Smith 19 Jones 9 Alexander 22 Smith 20 Smith 17 Tippurt 42 Jones 2 Herkman 12 Jones 11 Each line is a person's last name followed by a space and then his age. We want to sort these names alphabetically and in the case of duplicate names, sort by age in an ascending fashion. A properly sorted list will appear as follows: Abrams, 15 Alexander, 22 Herkman, 12 Jones, 2 Jones, 9 Jones, 11 Jones, 14 Smith, 17 Smith, 19 Smith, 20 Tippurt, 42 Paste in code from your BaseClass to input this file and then use a modified Selection Sort. Call you project Multi KeySort. (Notice the commas in the output.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
