CS1 Standard Demo Page

The following text was written to the standard output stream when the NumberSet.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=45877:/opt/intellij-idea-community/bin -Dfile.encoding=UTF-8 -classpath /home/dreitz/IdeaProjects/CS1/out/production/CS1:/home/dreitz/Desktop/SimplePainter.jar:/home/dreitz/Desktop/SimpleComposer.jar:/home/dreitz/Desktop/jfugue-4.0.3-with-musicxml.jar arrayplay.NumberList
>>> PRINT FIRST
1
>>> PRINT LAST
110
>>> PRINT 3
22
>>> PRINT 8
77
>>> SWAP 5 7
>>> DISPLAY
1
11
22
33
66
55
44
77
88
99
110
>>> SWAP 1 6
>>> DISPLAY
55
11
22
33
66
1
44
77
88
99
110
>>> 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 100 FIRST
### invalid operand for add command
>>> ### Unrecognizable command: FIRST
>>> ADD FIRST 100
>>> ADD LAST 200
>>> DISPLAY
100
55
11
22
33
66
1
44
77
88
99
110
0
200
>>> EXIT

Process finished with exit code 0