Instruction for assignment submissions
Failure to follow the instructions will result in a loss of points or failing grade.
You will turn in your assignment both electronically and on paper,
following the instruction below.
Electronic submission is due 10 minutes before the class and
the hardcopy is due in class on the day the assignment is due.
General programming requirements:
- All programs must compile and run on the CS Linux Lab machines: linuxlab.cs.pdx.edu
(different from the machines sirius, rigel, cs.pdx.edu, odin.pdx.edu, etc.)
- All programs require Makefile
- All programs require sensible comments
Papers submission:
- Your paper submission will be organized as follows: A cover sheet on top
with CS 201, the assignment number, your name, and your CS login name.
Order your papers in the order of the problems given.
- You'll include any problems given in the assignment. (There
may be none).
- For each programming problem, you will include the printout of your programs
organized in the following order: C source code (including header files if you have them),
Makefile, and finally
typescript output showing that the program works.
Use unix command script program for the typescript.
See here for information about how to make a typescript.
- Staple or clip all your printouts as a single submission.
Electronic submission:
- Email address:
Electronic submission must be sent to jrb@cs.pdx.edu.
- Subject line:
Use the subject line with three words in the following format (without the angle brackets):
cs201 hw<n>, <Your CS login name>, <Your last name>
where <n> is the assignment number (1, 2, 3, etc.).
For example, Subject: cs201 hw1, dmr, Ritchie.
where cs201 hw1 indicates this is for assignment 1, dmr is my CS login name,
and Ritchie is my last name.
- The tar file:
Your electronic submission will be packaged as a tar file with your CS login name.
For example, suppose your CS login name is "john".
Your tar file will be called "john.tar".
Once the TA untars the file, a directory "john/" will be created
and your submitted material will be extracted to the directory "john".
To create the tar file for each assignment,
first you need to create a directory with your name
and put your submission in that directory.
See instruction for making the tar file.
Note if the TA cannot recover the directory with your login name or cannot compile your program,
you are not considered to have turned in your project.
- Directory content organization:
Once you've created the directory with your name described above,
you will organize your files in the directory as follows:
- Your answers for all non-programming problems should be in a single plain text file.
Clearly label the problem number in your file.
- Each programming problem will have its own directory.
Name each directory such that it's easy to know which problem it is for (e.g., P2 for problem 2).
Place source code files, header files (if any), Makefile, and typescript
in the directory.
- Do not include any binaries or non-necessary files with your submissions.
- Email attachment:
Send only your tar file in the attachment of the email.
Note that you may submit your assignment multiple times if ncessary before it's due,
although this is not encouraged.
In the case of multiple submissions, we'll just use your last submission for grading.
Help
How to create a typescript
Use the Unix command script to make typescript of terminal session.
Simply type the command "script" before you start running your program.
You will see the message "Script started, file is typescript".
After that, everything you type in and everything displayed on the screen
will be saved in the file "typescript".
When you're done with the execution, type "exit" (to exit from the Unix script program).
You'll see the message "Script done, file is typescript".
For more detail, you should check out the man
page for the script program to see how to make a typescript.
Make a tar file of your program
Below is an example that creates a tar file for email submission.
Again assume that your CS login name is "john".
First, you will create the directory "john" (say, under /u/john/cs201)
and copy all the files and directories to be submitted into the directory /u/john/cs201/john/.
I recommend that you use "cp -p" for copying files.
For coping directories, you can use "cp -rp".
The option "-p" will preserve the original time stamps of your files,
and the option "-r" will copy the directories recursively.
Below shows a screen shot of making the tar.
/u/john/cs201/> ls john/
Makefile test.c typescript
/u/john/cs201/> tar cvf john.tar john/*
john/Makefile
john/test.c
john/typescript
/u/john/cs201/> ls -l john.tar
-rw------- 1 john them 10240 Mar 31 10:00 john.tar
Related commands:
- To see what are in a tar file, say "john.tar", do the following:
tar tvf john.tar
Note this command does not extract files from john.tar,
but rather it shows what're inside it.
This is very useful before you actually extract a tar file.
- To untar a tar file, say "john.tar", do the following:
tar xvf john.tar
This will create the directory "john" with all the files that are inside it.
Warning: whatever files and directories in john.tar will overwrite existing ones
with the same names. To test this command, it's better that you do it under a temporary
directory so that you don't overwrite anything by accident.
See other helpful information here.
Go to CS 201 home page