Starting from:

$29

Program #4: Linked List


Using a new List class template and main program (provided on moodle), you are to
\rewrite" the List class (from the EasyList assignment) so that it now uses a linked list
as the backend data structure as opposed to an array. You may not add any more public
functions to the template, but you can implement as many private helper functions as you
wish.
1. For this assignment, you will be provided three files:
• ListTest.java contains the main function. You may NOT modify this file!
• List.java currently contains a template, but should eventually contain your
implementation of the list class.
• 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. Please note the helpful comments scattered throughout the code. In many cases, they
provide hints and identify what not to do.
3. Please keep the naming of the file you are to modify (List.cc). This is the only file
you will turn in.
4. Label the file by typing your name in the commented section at the top of the
List.java file.
5. Compiling ListTest.java should automatically use your List.java file (assuming
they are in the same directory). After successful compilation, running the produced
executable file SHOULD produce output identical to ListTest.out.
6. 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)
7. For example, once completed, the three commands below should NOT produce any
output.
Linux: Windows:
javac ListTest.java
java ListTest myOutput
diff ListTest.out myOutput
javac ListTest.java
java ListTest myOutput
fc ListTest.out myOutput

More products