Download the jar file to your machine and save it as a file called "duckMachine.jar". Change your CLASSPATH setting so that it includes this jar file. Using the jar file, you can immediately run the machine by typing:
java duckMachine.Window
Download the program "test4.o" and save it on your machine. Load that program in the memory of the duck machine by clicking on "Load Object File" and selecting "test4.o" when the file dialog window pops.
Initially the machine is waiting at the first instruction "CLEAR 9". The "Step" command executes one instruction at a time, the "Run" command executes the entire program until it encounters a "HALT" instruction.
jar xf duckMachine.jarwill extracts all the files from the archive. It will create a directory "duckMachine" in the current directory and several subdirectories (one for each package).
public int length () public int indexOf (int ch) public int lastIndexOf (int ch) public String replace (char oldChar, char newChar) public String trim () public String toString ()The documentation of the methods is available through the standard Java API. Turn in the code for this part of the lab during class on Monday April 5. Write the lab (day and time) that you are attending on top of your assignment in addition to your name and SS#.
sabry@cs.uoregon.edu