How to Turn in Programming Assignments
Tyson Henry


I will create a directory on the Department fileserver for each student for each assignment.  For example, if there is a student with the username johndoe34 in my Computer Science 112 a directory will be set up for johndoe34 for each assignment:

/user/projects/csci112/p1/johndoe34
/user/projects/csci112/p2/johndoe34
/user/projects/csci112/p3/johndoe34
...

In order to turn in the assignment, John Doe must copy all required files to his directory for that assignment.  For example, if assignment p2 requires the files movie.h movie.cpp movie_db.h movie_db.cpp main.cpp, then all these files must be copied to John Doe's p2 directory.  Assuming that John has completed this assignment on one of the Department's machines, they can be copied using the cp command:

$ cp movie.h /user/projects/csci112/p1/johndoe34
$ cp movie.cpp /user/projects/csci112/p1/johndoe34
$ cp movie_db.h /user/projects/csci112/p1/johndoe34
$ cp movie_db.cpp /user/projects/csci112/p1/johndoe34
$ cp main.cpp /user/projects/csci112/p1/johndoe34

In this example, there must be a cp command for each file.

If all the .h and .cpp files in the current directory are for this project, then the * (wildcard) character could be used:

$ cp *.h *.cpp /user/projects/csci112/p1/johndoe34

For each assignment you need to know three things to turn it in:
  1. class number (112 in the above example)
  2. project name (p2 in the above example)
  3. your username (johndoe34 in the above example)


Turning in Files from a Remote Machine

If you are working on your own machine, you can use the programs scp or sftp to turn in your assignment.  Both programs come with Linux and you can install them in Cygwin by installing the openssh module (in Cygwin's Net installation directory).  If you have scp installed you use it as follows:

$ scp chart.cpp johndoe34@tiglon.ecst.csuchico.edu:/user/projects/csci112/p1/johndoe34

You can also use wildcards:

$ scp *.h *.cpp  johndoe34@tiglon.ecst.csuchico.edu:/user/projects/csci112/p2/johndoe34

sftp creates a connection when you can send and receive multiple files.  It is a bit harder to learn how to use but provides more functionality then scp.


Verify the Files you Turned in

Whatever method you use to turn in your files it is a good idea to make sure the process worked.  Log on to one of the Department machines (either by using a lab machine or via an ssh tool such as putty) and cd to your directory and look at the files:

$ cd /user/projects/csci112/p1/johndoe34
$ ls
.....
$ pico chart.cpp
....


Deadlines and Late Assignments

Access to the directories is limited to viable turn in times.  In other words, you will not be able to put files into a turn in directory or even see what files are in a turn in directory after the deadline.  Late directories are only accessible after the deadline and up to the late deadline.

For some courses I will provide a late directory (usually for courses that only allow 1 late day).  If there is a late directory for your course, you can copy a late program into that directory.  If there is not a late directory, e-mail the assigment to me as outlined in the assignment handout.  Below is an example of a class with a late directory.

/user/projects/csci112/p1_late/johndoe34
/user/projects/csci112/p2_late/johndoe34
/user/projects/csci112/p3_late/johndoe34
...

If you want to turn an assignment in late copy the files to the _late directory.  For example, if johndoe34 wanted to turn in p3 late, he could copy it to:

/user/projects/csci112/p3_late/johndoe34