Question: Part 6 : Implement TypesListsDriver 1 - At this point, you should have a driver class that you used to test the methods in the

Part 6: Implement TypesListsDriver
1- At this point, you should have a driver class that you used to test the methods in the OrderedList. For this part of the assignment, you need to create another driver class to test methods in TypesLists.
2- Similar to the previous assignments, your driver should read the data from a text file where each line in the input file represents one item and the line includes the following values separated by tab: (1) a number in {1,2} to specify whether the line represents an ItemA or ItemB object respectively, (2) string value, (3) integer value, and (4) an integer value for ItemA elements or boolean value for ItemB elements. Assume the input file is formatted correctly and you do not have to check for lines that are not in the given format. This is an example input file:
1 aaa1020
2 bbb20 true
2 aaa10 false
1 ddd4050
3- Create an input file of at least 20 lines with at 10 lines for each item type (ItemA/ItemB).
4- Write code to ask the user for the path of the data file, read the file name, open the file, read the file line by line, and upload the data to an TypesLists.
5- Display the two lists. Each list should have at least 10 items.
6- Include at least two test cases for each of the following methods: indexOf, get (one get from each list). Note that each method from TypesLists calls the corresponding method from the OrderedList.
7- The following methods change the list. Include at least two test cases for each method and display after the method call to ensure the method works as expected: add(index,item), remove(Item), remove(list, index).

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 Programming Questions!