Question: EXERCISE 2: (35 POINTS) This exercise is on the two-finger walking algorithm for ordered lists. The zip file provided to you has the Ordered List

 EXERCISE 2: (35 POINTS) This exercise is on the two-finger walkingalgorithm for ordered lists. The zip file provided to you has the

EXERCISE 2: (35 POINTS) This exercise is on the two-finger walking algorithm for ordered lists. The zip file provided to you has the Ordered List class that was discussed in the lectures. Step 1: Write a program m that reads a list of names from a file and constructs an ordered list. r //appropriate imports public class MergeLists public static void main (String[ args) throws IOException For example, if the input text file is Shai Tom Jim Aaron Barbara Beth Fred ac Jarred Jill Amar Ralph Jill it should create the following ordered list and display the contents of the list: [Aaron, Amar, Barbara, Beth, Fred, Hillary, Jack, Jarred, Jill, Jim, Ralph, Shai, Tom] Note: Although Jill is repeated in the input list, the ordered list does not have repeated items. Step 2: Modify the above program so that it reads two text files each containing a list of names and constructs two ordered lists. Step 3: Add a method to the above program that takes as input two ordered lists and returns a third list that is a merger of the two ordered lists. Use the two-finger walking algorithm discussed in class. For example, if list is Amar Boris Charlie Dan Fujian Inder Travis EXERCISE 2: (35 POINTS) This exercise is on the two-finger walking algorithm for ordered lists. The zip file provided to you has the Ordered List class that was discussed in the lectures. Step 1: Write a program m that reads a list of names from a file and constructs an ordered list. r //appropriate imports public class MergeLists public static void main (String[ args) throws IOException For example, if the input text file is Shai Tom Jim Aaron Barbara Beth Fred ac Jarred Jill Amar Ralph Jill it should create the following ordered list and display the contents of the list: [Aaron, Amar, Barbara, Beth, Fred, Hillary, Jack, Jarred, Jill, Jim, Ralph, Shai, Tom] Note: Although Jill is repeated in the input list, the ordered list does not have repeated items. Step 2: Modify the above program so that it reads two text files each containing a list of names and constructs two ordered lists. Step 3: Add a method to the above program that takes as input two ordered lists and returns a third list that is a merger of the two ordered lists. Use the two-finger walking algorithm discussed in class. For example, if list is Amar Boris Charlie Dan Fujian Inder Travis

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!