CSE 1320 Lab Submission Information for Dr. Tiernan's sections

Last Updated Dec. 23, 2010

 

1.                   Required lab submission items

a.       Script file (which will include a printout of the source file) (see 5 below)

b.       Source files (including all user defined .c and .h files) i.e. the program files written by you (see 6 below)

c.        Any data files created by you and used in testing as recorded in the script file.

2.                   Submission time

a.       Softcopies must be e-mailed to the TA BEFORE the due date and time if it is earlier than class time or 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 for program files: 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.        If there are input data files, use the same rules as above, include the word 'data' in the filename and use the file type .txt or .dat : xxxx1234Lab#data.dat for example

e.       FILES WHICH ARE NOT NAMED AS DESCRIBED ABOVE MAY NOT BE ABLE TO BE GRADED.

4.                   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 should include your omega ID, the word 'script', and the Lab number. Do NOT use the same name as the name of your C program. For example you might call your script file xxx1234script# or xxx1234scriptLab#.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

 

5.                   Emailing softcopy to the TA. : New for Fall 2010 - Changes to sending e-mail from omega

a.       Mail all your files as attachments to one e-mail message to the TA by the due date and time.

b.       Required e-mail Subject: "C1320 xxxx1234 Lab#" where s is the section number of the class and xxx1234 is your omega user ID and # is the number of the lab assignment being submitted.

c.        Send the softcopies directly from omega to the TA using alpine or mutt.

New stuff as of Fall 2010

Alpine: OIT has removed much of the mail functionality from omega. The pine and elm mail systems are no longer available. You may choose to use the mail system called alpine which is a revised version of the old pine system. The alpine e-mail system is an extension of the previous pine system. If you do not know how to use pine, refer to: http://www.washington.edu/pine/tutorial.4/index.html . Some other info about alpine is available at http://www.washington.edu/alpine/faq/

Mutt: Alternately, the following steps will still allow you to e-mail your assignments from omega but you will be using a much more simplistic mail system called mutt.

Step 1: Using your favorite editor, make a little text file that contains a message like "This is my lab assignment for CSE1320." This text file will be the body of your e-mail message to the TA when you send it. Call your text file something like body.txt .

Step 2: Have your lab assignment files, i.e. the c file, the script file, any data files, all in the same directory and make sure the body.txt file is also in that same directory.

Step 3: Send the files to the TA using the mutt system. In the example below, assume that the xxxx1234Lab#.c is the name of the c file, xxxx1234scriptLab#.log is the name of the script file, and xxxx1234Lab#data.txt is the name of the input data file you have used for testing. Also, the example below sends a carbon copy of the message to yourself (yourname@mavs.uta.edu where you replace yourname with your e-mail name.) Note that the command below is LOOOOONG to type.

        mutt    -s "C1320 xxxx1234 Lab#"   -a xxxx1234Lab#.c   -a xxxx1234scriptLab#.log   -a xxxx1234Lab#data.txt    TAemailaddress@whatever     -c yourname@mavs.uta.edu < body.txt

Note 1: The "dash s" -s tells mutt that the following string in double quotes is the message subject.

Note 2: The "dash a" -a is the required option to attach a file and the -a must be used before every file that is being attached.

Note 3: This is the recipient e-mail address.

Note 4: The "dash c" -c is the option to carbon-copy to an e-mail address.

Note 5: Be default the body of the mail message would be typed by the user from the keyboard after the mutt command was entered. Using the "less than" symbol < redirects the input from the file body.txt instead.

d.       Send the source code and other files to the TA as ATTACHMENTs to the e-mail message. Do not put the code in the body of the e-mail.

e.        If you resubmit your source code before its due date, add "new version" in addition to the information above.

f.         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.

 

6.                   Coding Issues

a.       Submitted source code must compile and run without errors or warnings.  This means that ALL choices the user can make when running your code must work properly and ALL inputs (excluding ones the lab instructions say you don't have the deal with) must work properly even if the input value is invalid; for example, a negative value for a month must NOT make your program crash. 

 

        If your program does not compile using gcc on omega, you will get a ZERO (0). 

        If your program compiles but has warnings using gcc on omega, you will get a ZERO (0). 

        If your program crashes while the TA is testing it, you will get a ZERO (0). 

 

b.       Working partial labs may be submitted for partial credit.  A partial lab is one that only implements some of the requirements and that compiles and runs without errors or warnings.

 

c.        Be sure to follow the documentation guidelines discussed in class including indentation

d.       NO GLOBAL VARIABLES MAY BE USED IN YOUR CODE

e.        Global constants are allowed in the form of #define statements or const declarations

f.         Use all UPPERCASE for the names of constants in your program

g.       Use all lowercase or mixed case for the names of your variables