Program #5: Generic List


5/5 - (2 votes)

Modify your List class that you submitted for Program #4 to support generics such that
it can store not just integers, but other types such as floats and characters.
Make a copy of your version of, modify it to satisfy the new tests, and
then submit the new improved version.
1. For this assignment, you will be provided with two files:
• contains the main function. You may NOT modify this file!
• ListTest.out contains the output from my implementation of the list class. You
would be wise to ensure your output is EXACTLY the same (That includes
spacing and formatting).
2. This assignment involves changing about eight lines in the node class and twentytwo lines in the List class so I expect you to complete it in under 30 minutes. But as
some of you might have learned from Program #4, you do not want to wait till the
last 30 minutes before it is due to start it.
3. Compiling should automatically use your file (assuming
they are in the same directory). After successful compilation, running the produced
executable file SHOULD produce output identical to ListTest.out.
4. Feel free to redirect the output to a file of your choosing, and then compare the two
files (i.e. ListTest.out, and your output file) using the command prompt with commands such as diff, comm, fc, or any other you deem appropriate)
For example, once completed, the three commands below should NOT produce any
java ListTest myOutput
diff ListTest.out myOutput
java ListTest myOutput
fc ListTest.out myOutput

PlaceholderProgram #5: Generic List
Open chat
Need help?
Can we help?