Last Updated Sep. 18, 2006
1. Submission items
a. Softcopy of script file (which will include a printout of the source file) (see 5 below)
b. Softcopy of source files (including all user defined .c and .h files) i.e. the files written by you (see 6 below)
2. Submission time
a. Softcopies must be e-mailed to the TA BEFORE the beginning of class time on the due date
b. Late labs (i.e. late e-mails) will receive a zero (0) grade unless prior arrangements have been made with the instructor
3. Required filename: xxxx1234Lab#.c or xxxx1234Lab#.h
a. xxxx1234 : Your omega login ID
b. # : the lab assignment number (Lab1, Lab2, etc.)
c. If there are multiple source files then the names should have ‘a’, ’b’, etc. appended: xxxx1234Lab#a.c and xxxx1234Lab#b.c for example
d. FILES WHICH ARE NOT NAMED AS DESCRIBED ABOVE MAY NOT BE ABLE TO BE GRADED.
4. Coding Issues
a. Be sure to follow the documentation guidelines discussed in class including indentation
b. NO GLOBAL VARIABLES MAY BE USED IN YOUR CODE
c. Global constants are allowed in the form of #define statements or const declarations
d. Use all UPPERCASE for the names of constants in your program
e. Use all lowercase or mixed case for the names of your variables
f. Submitted source code must compile and run without errors or warnings.
g. Working partial labs may be submitted for partial credit.
5.
How to make a script file.
A script file is a recording of
everything that is printed on the computer screen from the time the script
session is started (with the command script ) until the script session
is ended (with the command exit). Following are all the steps needed to
make the script file for your assignment.
See the man (manual) page on omega for more info about script (omega>
man script)
a. Remove old compiled versions of the code with the command:
omega> rm a.out
b. Start the recording of the script file that you will call scriptfilename. The scriptfilename can be any name you choose but do NOT use the same name as the name of your C program. For example you might call your script file xxx1234script# or xxx1234lab#.log. Use the command:
omega> script scriptfilename
c. Using the cat command, print out the program source file (your program) to the screen so that it is recorded in the script file. If you have multiple files, just cat them one after another. (cat stands for concatenate)
omega> cat xxxx1234Lab#.c
d. Print a listing of the current directory (to show that there is no compiled version of your lab in the current directory)
omega> ls -l
e. Compile your source file
omega> gcc xxxx1234Lab#.c
f. List the directory again showing the new compiled file named a.out (the default name for the compiled program) or whatever you named it
omega> ls -l
g. Run the program by invoking a.out or whatever your compiled program is named. Run any given sample data and your chosen data as well.
omega> a.out
h. When you have run all the needed executions of your lab assignment, end the script session by typing
omega> exit
i. To eliminate excess blank lines in your script file before printing you can do the following command. Remember this is using the scriptfilename as the input. You should save the resulting file into a new script file name (newscriptfilename)
omega> col –b < scriptfilename > newscriptfilename
6. Emailing softcopy to the TA. :
a. Mail all your source files to the TA by the due date.
b. When you mail your source file to the TA, make sure you put the lab number, your class and section numbers in the e-mail subject since the TA may have more than one section of 1320 to work with.
c. If you resubmit your source code before its due date, add “new version” in addition to the information above.
d. Make sure to copy yourself on the e-mail so you can show proof of on-time submission just in case your TA does not receive your e-mail.
e. Send the softcopies directly from omega to the TA.
f. Send the source code to the TA as an ATTACHMENT to the e-mail. Do not put the code in the body of the e-mail.
g. The pine e-mail system makes this easier to do than the elm system on omega. If you do not know how to use pine, refer to: http://www.washington.edu/pine/tutorial.4/index.html