Procedures for Submitting Your Java Programs

HOME

1) Before beginning the programming assignment of a problem set, you should create a directory in your account for that problem set, and do the work for that problem set in that directory. The following sequence of commands will do this for unit5 (change the number for later assignments -- everything else will remain the same):

     [is01]~>  cd
     [is01]~>  mkdir unit5 
     [is01]~>  cd  unit5
     [is01]~/unit5>%

This makes the new directory, and then switches you into it.  Note that the numbers in [is01] may vary...  That's just Unix doing its thing...

2) Now, working on nice.harvard.edu, type in (or transfer the files), compile, and debug your programs.  You'll end up with a bunch of files, some with a '.java' suffix and some with a '.class' suffix.

3) Once you're ready to turn in your programs, you should use 'script' to generate demo output. If your source file is "Rocks.java," you should name your script file "Rocks.out", so we can tell which program it is the demo for! Here's how it works; at the [is01] ~/unit5>% prompt type the following (the name "Rocks.out" is just an example):

     [is01]~/unit5>% script -a Rocks.out

From this point on, until you type an 'exit' command at the [is01] ~/unit5>% prompt, EVERYTHING THAT APPEARS ON THE SCREEN ALSO GETS SAVED IN A PRINTABLE FILE NAMED Rocks.out (in this example). Typically, you would run the program several times, with either the sample input given by the handout or your own judiciously selected input. IF THE HANDOUT GIVES SAMPLE INPUT, USE THAT INPUT (at least; you may include more).  Once you've finished running the program, end the 'script' session by entering an 'exit' command. 'Exit' commands include: exit, bye, <ctrl>-D, as in

     [is01]~>  bye
...some messages appear: exit, Script done, file is Rocks.out...
Now, you can print out the file "Rocks.out" and hand it in! Easy as pie! PLEASE always use the -a modifier with the script command - we DID have people who lost homework programs and projects this past semester because they overwrote their .java file by accidentally typing in the wrong file extension!! The -a modifier will always append your tests to the file.



Once you have thoroughly tested your code and created "demo output" files, submitting your assignment is easy.

   

TO SUBMIT ELECTRONICALLY, connect to nice.harvard.edu and simply type (at the prompt):

     [is01]~> submit libe50b 51 ~/unit5

The syntax is picky: there are four parts to that command. The first two are easy, just type them in; the remainder require explanation:

  • submit -- just type this in
  • libe50b -- just type this in
  • 51 -- the "assignment number" - we will provide this to you for each problem set.   51 is correct for Homework 5 part 1.  
    FYI: IF a unit 'n's problem set gets broken into two parts, the "assignment numbers" will be n1 and n2 (example: since Homework 5 has three parts: the "assignment numbers" will be 51, 52, and 53)
  • ~/unit5 -- the directory containing the files you're submitting. The wrinkle is that it must be a "full" pathname. Putting the "~/" before the directory name does this for you.
    unit5
    -- the name of the directory containing the files, as created in your home directory at the top of this handout. YOU MAY NAME YOUR DIRECTORY WHATEVER YOU WISH - THIS IS NOT COPIED.

That's it! BUT... it will only work if you've fully and correctly completed steps 1 - 3 above. If you have trouble, reread these instructions to make sure you've done everything indicated above.

If all's well, you'll see a few messages, then a message stating that submission was successful.

    ice3:~ % submit libe50b 51 ~/unit5
    Ok, submitting the files in /home/j/j/jjackson/unit5
    Creating temporary directory /tmp/jjackson.submit...
    Copying assignment files to /tmp/jjackson.submit...
    Opened file /home/l/i/libe50b/submit/asst51/jjackson.tgz
    Submitting libe50b assignment 51... Done!
    Temporary files removed.
 
By the way, it's OK TO RE-SUBMIT revised versions of programs. The 'submit' program will notice that you've already submitted, and will cautiously let you re-submit, prompting you about proceeding.

IF YOU RE-SUBMIT, NOTE THE FOLLOWING:

  • CLEARLY MARK THE NEW VERSION AS "REVISED VERSION - PROB SET 'X', PROBLEM 'N'" or similar... and email your Teaching Fellow to let him/her know!
  • When you resubmit, you'll see the same message that you had before. PLEASE remember that you need to include ALL the files due for that particular homework, as the resubmit overwrites any prior submissions.

TOP