UserPreferences

CS206:Project #2


CS206 Project #2

Unique Linked List

Create a linked list that can read a variable number of words with no maximum (one per line) from standard input (System.in) and create a list of unique items in the list. Keep track of how many items are in the list. Exit when you receive a null line.

After reading in all of the words, print out the list in the order that the words were read in.

Testing

Try this:

% cat /usr/share/dict/linux.words | java YourProgram
% cat yourProgram.java | java YourProgram

Expectations

Keep all your indentation consistent and easily readable. Add appropriate comments.

Bonus

In addition to unique, make the list sorted alphabetically.