CS1 Standard Demo Page

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

/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java -javaagent:/opt/intellij-idea-community/lib/idea_rt.jar=45195:/opt/intellij-idea-community/bin -Dfile.encoding=UTF-8 -classpath /home/qceilly/IdeaProjects/CS1/out/production/CS1:/home/qceilly/Downloads/SimplePainter.jar:/home/qceilly/Downloads/SimpleComposer.jar:/home/qceilly/Downloads/jfugue-4.0.3-with-musicxml.jar arrayplay.NumberList
>>> 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
8
6
10
2
45
68
91
88
7
5
11
25
31
42
15
>>> print first
8
>>> print last
15
>>> print 3
10
>>> print 14
42
>>> swap 5 7
>>> display
8
6
10
2
91
68
45
88
7
5
11
25
31
42
15
>>> swap 1 15
>>> display
15
6
10
2
91
68
45
88
7
5
11
25
31
42
8
>>> 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
15
6
10
2
91
68
45
88
7
5
11
25
31
42
8
200
>>> exit