CS1 Standard Demo Page

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


>>> display
1
3
5
6
7
8
55
33
4
2
50
25
>>> print first
1
>>> print last
25
>>> print 3
5
>>> print 10
2
>>> swap 5 7
>>> display
1
3
5
6
55
8
7
33
4
2
50
25
>>> swap 1 12
>>> display
25
3
5
6
55
8
7
33
4
2
50
1
>>> 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
25
3
5
6
55
8
7
33
4
2
50
1
200
>>> exit

Process finished with exit code 0