NumberList Demo

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

>>> help
HELP - display a menu of commands
DISPLAY - display the list of numbers
PRINT - print a number (FIRST;LAST;nth)
SWAP - exchange two elements (nth;mth)
ADD - add a number to the list (FIRST;LAST)
EXIT - terminate execution of the program
>>> display
2
4
5
6
9
4
1
4
5
0
7
32
>>> print first
2
>>> print last
32
>>> print 3
5
>>> swap 5 7
>>> display
2
4
5
6
1
4
9
4
5
0
7
32
>>> add first 100
>>> display
100
2
4
5
6
1
4
9
4
5
0
7
32
>>> exit