Intro to Java Classwork: List Keeper, Part 2
Copy your code from your previous program ("ListKeeperPart1.java)
into a new file named "ListKeeperPart2.java".  Then, make the
following modifications to your code in your new file:

  1) Instead of storing the user's words in a Java array, you must
     use a Java ArrayList of Strings to store all of the words.
     You may use only one ArrayList in your program, and you may not
     use any arrays (or other types of Java Lists or Collections).

  2) Allow the user to enter an unlimited number of words.  The
     user should still press the ENTER key after each entry, and
     should press ENTER on a line by itself (with no word) when
     finished entering words.

  3) Add an additional method to your program that prevents duplicate
     words from being added to the list (ignoring case).  This method
     should be called from within the method that gets the words from
     the user.  Specifically, it should be called after the user
     enters each word, but before the word is added to the ArrayList.
     The word should be added to the list only if it is not already in
     the list.  If the word is already in the ArrayList, tell the user
     that the word is being skipped because it is a duplicate.

  4) Instead of displaying the user's word list in reverse order,
     display the words back to the user in the same order in which
     they were entered, but using all CAPITAL letters.

As was the case with the previous assignment, you must keep the 'main'
method as sparse as possible.  Your code for getting the words from
the user must still be in its own method, and the code for displaying
the words back to the user must also remain in its own method.

Other than the 'Scanner' class and the 'ArrayList' class, for this
program you may not import or use any external methods.  Also, other
than the single Java ArrayList of Strings, you are not allowed to use
any global variables in your program.  The output of your program
should be neat, organized, and easy to understand.


As always, all of your code must be your own, written entirely and
only by you within your online CodeHS.com account.  You must never
copy/paste, receive, view, or in any way use code that was created
or modified by another person, entity, or artificial intelligence.


Advanced Option #1
Use the word number when asking the user to enter words into the
ArrayList.  For example:  "Please enter word #1:".

Advanced Option #2
In addition to, or instead of, the above advanced option, add a
feature that requires the user to enter at least one word into
the ArrayList.  If the user presses the ENTER key on a line by
itself before entering any words, keep asking the user to enter
a word until at least one word is in the ArrayList.

Advanced Option #3
Add an additional method that is called after the user has
finished entering words and the word list has been displayed
back to the user using all capital letters.  This new method
should ask the user to enter an integer representing the maximum
number of characters allowed in each word, and then remove from
the ArrayList every word that contains more characters than the
limit just provided by the user.  Then display the (possibly
revised) list of words using the original case (i.e., not
necessarily with all capital letters).  This option may be
completed along with, or instead of, the above advanced options.

Advanced Option #4
Add an additional method that sorts the words in the ArrayList
in ascending order by word length.  In other words, change the
order of the words in the list so that the shortest word comes
first, the longest word comes last, and every word in between
is ordered accordingly.  Within each group of words that has
the same number of characters, sort those words alphabetically
in ascending order.  When done re-ordering the words, display
the sorted ArrayList back to the user.  This option may be
completed along with, or instead of, the above advanced options.