CS1 Standard Demo Page

The following text was written to the standard output stream when the WordList.java program was executed from IntelliJ.

nThe original list of words ...
cat
dog
pie
angel
french
ferret
ginger
bunny
fruit
cookie
rainbow
>>> help
HELP - display a menu of commands
DISPLAY - display the list of words
PRINT - print a word (FIRST;LAST;nth)
SWAP - exchange two elements (nth;mth)
ADD - add a word to the list (FIRST;LAST)
EXIT - terminate execution of the program
>>> add last
friend
>>> display
cat
dog
pie
angel
french
ferret
ginger
bunny
fruit
cookie
rainbow
friend
>>> swap 4 8
>>> display
cat
dog
pie
angel
fruit
ferret
ginger
bunny
french
cookie
rainbow
friend
>>> print 3
pie
>>> exit