Last Updated Jan. 3, 2012
1. Required lab submission items for all assignments
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. All files must be uploaded to Blackboard 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
- You must e-mail the class instructor Dr. Tiernan for permission to turn in a lab late.
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. Submitting your work through Blackboard :
a. Upload all your files, including the script file, from omega to your local machine using Terminal (Macs) or sftp (PCs). Do not open the files using MS Word! It does yucky things to the formatting. If you want to check the files before submitting to Blackboard use something like Crimson Editor or Notepad to view them. You can also e-mail files to yourself using alpine (mail system on omega) but the other systems are less likely to mess up the files.
b. Log into Blackboard for this class.
c. Find the correct assignment and upload your files for that assignment. I will try to have a place for you to upload the script file and then one or more C source code files.
d. Blackboard will allow you to resubmit your source code and other files before its due date and will record the time of submission.
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 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
6. Coding Issues
a.
Submitted source code
must compile and run without
errors or warnings compiled with the gcc compiler on the UTA omega LINIX computer
.
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