Starting from:

$29

Program #3∗ : Easy List


Update the list class that uses an array to implement its backend that we worked on in
class. This time, the list must store integers instead of characters. Let’s also agree that
the function GetValue should return the value at some index in the list or -1. For this
assignment, you will be provided two files:
• ListTest.java contains the main function. You may not modify this file!
• ListTest.out contains the output from my implementation of the updated list class.
You would be wise to ensure your output is exactly the same.
Please keep the naming of the file you are to modify (List.java). This is the only file you
will turn in. Do not turn in any other files (e.g., other .java sources or .class compiled
bytecodes).
• Compiling ListTest.java should automatically use your List.java file (assuming
they are in the same directory). After successful compilation, executing the class file
SHOULD produce output identical to ListTest.out.
• 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 using
commands such as diff, comm, fc, or any other you deem appropriate.
• For example, once completed, the three commands below should NOT produce any
output.
Linux: Windows:
javac ListTest.java
java ListTest myOutput
comm -3 ListTest.out myOutput
javac ListTest.java
java ListTest myOutput
fc ListTest.out myOutput

More products