MIME-Version: 1.0
Server: CERN/3.0
Date: Sunday, 24-Nov-96 22:34:04 GMT
Content-Type: text/html
Content-Length: 4901
Last-Modified: Friday, 22-Nov-96 17:21:18 GMT
CS211 Code Samples
Code Samples
You can download these code samples by using Save As
command in the File menu of Netscape.
Demonstration 1
Code for dBase application (lectures 3-6)
Solutions to assignment 1
Solution to assignment 2
Code Skeletons for assignment 3
- Simulator skeleton
This shell program reads in files containing ADD and STOP commands,
and prints out the commands after picking apart the commands. Try it out
on the sample file first.jrm .
- Complete Simulator for JRM --
Downloading this will create a JRM.out.hqx. You might need to decode
this by double clicking on the .hqx file. The executable is JRM.out.
The executable is a droplet . Run the simulator by
dragging the code file (containing the instructions) and dropping it
on the executable (JRM.out). Note that there are bugs in Codewarrior's
implementation of Java runtime utilities that cause certain features to
have unexpected behaviour.
- Scanning strings for register number
Sample JRM codes
Sample shell for assignment 4
- Simulator Shell
This shell re-implements the previous assignment using inheritance and
abstract classes. Try it out on the sample file
first.jrm .
Sample JRM codes for assignment 4
New! Multi-Threaded JRM simulator
Downloading this will create a
JRM.out.hqx. You might need to decode this by double clicking on the
.hqx file. The executable is JRM.out. This is a runnable zip file and
not a droplet. You launch it by double clicking on the .out file. You
must first reboot (the simulator,not your mac :-) and then load the
file to be executed by using the LOAD button on the simulator.
Sample JRM code for assignment 5
Shells for assignment 6
Download the three files and make a runnable zip file out of them.
Study the code in GUI.java and the code in the main() method in the
class Simulator. Some new methods have been added to the JRM class
to do the actions requested, but the JRM code is mostly the same as
the solution to assignment 5.
- Example code to illustrate buttons,
textfields, labels and lists.
Complete GUI and JRM code
Here is the complete GUI and JRM code as a stand alone
application. You can use this as the base for the applet assignment.
This code does not fix the bugs in Lists present in CodeWarrior as
Netscape does not have these bugs.
Be sure to read the
notes for assignment 8.