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
52
13
46
9
0
23
85
99
37
74
30
67
21
83
56
>>> print first
52
>>> print last
56
>>> print 3
46
>>> print 14
83
>>> swap 3 14
>>> display
52
13
83
9
0
23
85
99
37
74
30
67
21
46
56
>>> swap 1 15
>>> display
56
13
83
9
0
23
85
99
37
74
30
67
21
46
52
>>> 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
>>> add first 100
>>> add last 200
>>> shownumbers
### Unrecognizable command: shownumbers
>>> display
100
56
13
83
9
0
23
85
99
37
74
30
67
21
46
52
200
>>> exit
BUILD SUCCESSFUL (total time: 1 minute 19 seconds)