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 : Implement TypesListsDriver
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.
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: a number in to specify whether the line represents an ItemA or ItemB object respectively, string value, integer value, and 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:
aaa
bbb true
aaa false
ddd
Create an input file of at least lines with at lines for each item type ItemAItemB
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.
Display the two lists. Each list should have at least items.
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.
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: addindexitem removeItem removelist index
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
