CSCI 245: Miscellaneous tips (including turning in programs)

Preparing a script

You will usually be asked to provide a script file that records you compiling and running your files. Here are the steps to take:

  1. First, clean up. If it is a Java program, remove the compiled (.class) versions of your files, using the rm command. If you want to get rid of all of the class files, you can use the command
    rm *.class
    
    You'll have to be more judicious if you were provided some class files that you need to keep.

    For a C program, the makefile should let you do make clean.

  2. Now, start recording by giving the command
    script
    
    Everything that goes to your terminal will now also be recorded in the a file named typescript.
  3. List the directory, with long details:
    ls -l
    
  4. Compile your files. Use make for C programs; compile Java programs explicitly, either one by one or all at once with
    javac *.java
    
  5. Run each program with inputs that have been chosen to show that your program works for a representative set of cases. Include the tricky cases.
  6. End the script with the command exit.

Printing a program and scripts

Decide what files you should print and in what order. You can print them all with
a2ps --file-align=virtual filenames ...
Some useful options for a2ps include:

Handing in files electronically

To turn in a lab or project electronically, either use
make handin
if that has been provided. If you have to do it manually, use something like
/cslab/class/csci245/bin/handin labname filenames ...
The labname (or project name) will be specified in the assignment. Include all of the files (usually Java source and a typescript) on a single command. Be sure that you see the report of successful submission. You can submit more than once; the last submission can always be found.


Cary Gray

Last modified: Thu Jan 24 09:23:30 CST 2013

Valid HTML 4.01!