CS1 Standard Demo Page

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

>>> 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
14
91
73
57
46
3
28
8
61
86
7
41
19
25
30
>>> add first 40
>>> display
40
14
91
73
57
46
3
28
8
61
86
7
41
19
25
30
>>> add last 33
>>> display
40
14
91
73
57
46
3
28
8
61
86
7
41
19
25
30
33
>>> swap 3 5
>>> display
40
14
57
73
91
46
3
28
8
61
86
7
41
19
25
30
33
>>> print 3
57
>>> print 6
46
>>> exit