CS202 Computer Science II
FAQ Newsboard  Telnet Email TA Lectures Assignments Man pages Help

Turning in Assignments

Subject to change!


For the first couple of assignments we have very simple assignment turnin instructions.

  1. Make a script file
  2. Put source code and script file on diskette.
  3. Print source and script file
  4. Put diskette and hardcopy in an envelope and turn it in to me at the beginning of class. I will not accept assignments if you hand them in after I start class -- no exceptions.
I'll provide more details using assignment X as an example:

Step1:
Suppose you have created a file named asX.cpp which contains your code for assignment X. In the first step you make a script file by running the following commands

% script asX.dat
% cat asX.cpp
% make
% asX
...
...
% exit

The first command provides the name of the file in which all subsequent interaction that appears on the screen will be copied to. The second command prints the file ``asX.cpp'' (presumably your assignment X's source code) on the screen. Next, we invoke the compiler to compile you code and create an executable named ``asX'' (in this assignment the make command invokes the compiler and linker for you). Finally, the last command runs the executable. Run it as many times as needed to let the grader appreciate what your program does and what it doesn't do. Program testing is very important and counts towards your grade. exit leaves the script.

Access the man page on script to find out more about ``script.'' Make sure that the name of the script file (in this case asX.dat) is different from any other file name in the current directory. Use ls to list all files in your current directory.

Step2:
Copy the results to a DOS formatted diskette. We need you to copy the source (asX.cpp), executable (asX), and script (asX.dat) files using the two following commands to do so.

% mcopy asX.cpp a:
% mcopy asX a:
% mcopy asX.dat a:
Please make sure that you have inserted a DOS formatted diskette in drive before you run the mcopy commands. Read the man page on mcopy to find out about mcopy and other DOStoUNIX and UNIXtoDOS tools. The first command will copy source code to the diskette, while the second will copy the script file.

Step3:
Change to the directory that contains your assignment files. Then type

% lpr -Plp asX.cpp 
% lpr -Plp asX.dat
to send the source and script files to the printer.

Step4:
Put the hardcopy and floppy in an envelope. Make sure your name, the assignment number and email address are on the envelope.