NOTE:
This is for submitting Java homework. Scratch homework will be
submitted as directed in Homework 1.
1) Before
beginning the programming assignment of a Java problem set, you
should create a directory in your FAS account for that problem
set, and put the work for the problem set in that directory. The
following sequence of commands will do this for Unit 2, part 1
(change the number for later assignments -- everything else will
remain the same):
[is01]~> cd
[is01]~> mkdir unit21
[is01]~> cd unit21
[is01]unit21>%
This
makes the new directory, and then switches you into it. Note
that the prompt [is01] may
vary... That's just Unix doing its thing...
2) Now,
either create them at home and transfer them
using a secure FTP program, or, in Java, you may type in,
compile, and debug your programs here. You'll
end up with a bunch of files.
3) Once
you're ready to turn in your Java 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]
~/unit21>% prompt,
type the following (the name "Rocks.out" is just an example):
[is01]~/unit11>% script -a Rocks.out
From
this point on, until you type an 'exit' command at the [is01]
~/unit11>% 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 include the file "Rocks.out", and any other demo files, in your
directory when you submit.
Once you
have thoroughly tested your code and created "demo output" Java files
(if needed), submitting your assignment is easy.
- TO
SUBMIT ELECTRONICALLY, first connect using ssh to nice.harvard.edu and
enter your password when asked. Once there, simply type (at the
prompt) the underlined command:
[is01]~> submit libe50a 21 ~/unit21
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
- libe50a --
just type this in
- 21 --
the "submit number" - we will provide this to you for each problem
set. 21 is correct for Homework 2 part 1.
FYI: IF a unit 'n's problem set gets broken into two parts, the "submit
numbers" will be n1 and n2 (example: if Homework 2 had only two parts, the "submit
numbers" would be 21 and 22)
- ~/unit21 --
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.
unit21 -- the name of the directory containing the files, as created
in your home directory at the top of this handout
That's
it! BUT... it will only work if you've fully and correctly
completed the steps 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 final statement saying that
submission was successful.
[is01]~> submit libe50a 21 ~/unit21
Ok, submitting the files in /home/m/o/morris/unit21
Creating temporary directory /tmp/morris.submit
Copying assignment files to /tmp/morris.submit
Opened file /home/l/i/libe50a/submit/asst21/morris.tgz
Submitting libe50a assignment 21... Done!
Temporary files removed.
[is01]~>
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.
|