CS1 Standard Demo Page

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
5
10
25
63
4
56
28
14
78
45
>>> print first
5
>>> print last
45
>>> print 3
25
>>> print 10
45
>>> swap 5 7
>>> display
5
10
25
63
28
56
4
14
78
45
>>> swap 1 10
>>> display
45
10
25
63
28
56
4
14
78
5
>>> 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
45
10
25
63
28
56
4
14
78
5
200
>>> exit