You will be given Labs throughout the semester, typically one each week. You are expected to do them by yourself, during your assigned lab meetings and on your own if you need more time.
To solve the problem, enter any needed programming statements or computer commands. Copy your session and paste it into a text-only document to turn in. This should include the system "$" prompts.
The Labs will be posted on a link below.
Some Labs may require other files. In that case, use the cat command to show them. For example, if you create a file called "myexample.c", you should use the command cat myexample.c to display the contents of that file to the screen. If it is a binary data file, use an appropriate command such as xxd instead.
Make sure to show enough runs of your solution to reasonably prove that it works for all cases. For example, if you have an "if" statement, you should show that it works no matter if the condition is true or false. This may not apply to some Labs.
A script is short for typescript, where everything typed is saved. This keeps a log of all the input and output. Unix computers provide this capability with the script command. For example, script pc1.txt records all inputs and outputs in a file named ``pc1.txt''. If the file already exists, it will be over-written. For example, if you have a homework file called ``hmwk1.c'', do NOT call your script file ``hmwk1.c'', or it will overwrite your homework! Make sure to keep a backup of your work. Type man script at the prompt for more information. You may not need to use the script command for all Labs.
Include a complete but concise log of your activity. Complete means that anyone who types in what you type will see what you report. For example, if you type ./hello and get hello! as the response, then you should include (before this) the program that you made that prints that message. You should not include extraneous things. For example, you might type vi lab6.c at some point to modify that file, and that will create a lot of characters in the log. This is extraneous unless the Lab specifically asks for it.
This should appear at the very top of the
work that you turn in.
Put this information at the top-left
of the page. The text in italics show where you need to make
changes. You do not literally use italics.
Your Name
CSc 3320 Lab #1
Account: your account
name
Due date: put the due
date here
Paste a log of your activity here.
Turn in your work via iCollege.
Make sure to use a non-proprietary format for any files that you submit. Non-proprietary formats include .c, .csv, .txt, .odt, and .pdf. (Click here for more information.) Also make sure that the format used is appropriate for the assignment, for example, an assignment to write a C program should be submitted as a .c file.
Make sure that your code/printouts use a monospaced font. This mainly applies if the assignment asks you to print your solution. Your code should be plain-text only, and use a .c, .sh, or .txt extension as needed.
You are responsible for making the printout (or submitted file) look professional. This means removing any extraneous or weird (non-alphanumeric) characters that might appear in the printout.
Be prepared to demonstrate your solution to the TA. If you are asked to demo your solution, you should establish the date and time before you turn in the assignment. The solution that you turn in should indicate the agreed-upon date and time. That is, you can demonstrate your solution before or after the due date, as long as you have it scheduled before the assignment is due.
Click here for the assignmentsLate submission within one week will receive the late penalty as given in the syllabus. A submission over one week late will not be graded.
If a demo is required, it has to be scheduled and shown within a week. Failure to show demo will receive a penalty.
In any language, good documentation is very important. You can add comments at the end of a line, or above a line. Your program should include comments within the code, not just at the top. These comments will explain what your program is doing. You should have good comments, informative function/variable names, and consistent indentation.
Comments should to be succinct (short and useful). Comments for the description, or above functions, should be as detailed as needed.
If you need to answer questions, create a file and type in your answer. Below, you will use cat
to display your answer.
File Name
Your Name
CSc 3320 Lab/Homework #Y
Account: your account name
Due date: put the due date here
Description: Detailed description of the program
Input: The description for input
Output: The description for output
Usage: An example of how to run your program
When you are finished with the assignment, use the script
command to capture your activities. This creates a log file, and you should give it a ".txt" extension.
The script
command should be issued on the SNOWBALL server, not before you have connected to it.
Use cat
to show the programs you've made along with the file(s) containing explanations/comments. If appropriate, show data files.
Show the compilations of each program. Also show test run(s) of the programs.
If you need to answer questions, use cat
to display your answers.
The log file you turned in should be readable, which means program or test run(s) should be clearly shown line by line. All unreadable or unnecessary content should be removed. Your submission will not be graded if you fail to do so.
Here's a way to do this. Call your script file with an extension like ".log", e.g.
script lab5.log
Then, after you have used the exit
command to stop the script,
use
cat lab5.log
and highlight the text, copy it, and paste it into a new file. You can
create a new file with vi
or whatever editor you want
as long as you save it as plain text only. If you use vi, you
do not have to worry about this. With other editors, watch out for
the editor converting it to a proprietary format like .rtf.
vi lab5.txt
While you are in the editor, remove any extraneous stuff.
If any line is copied from other source that must be specified in comments. You should not be using other people's code in your programs. If you do, you must indicate what it is (including which lines), who wrote it, and where it comes from.
Make sure to keep a back-up of your files, including the log file before cleaning it up.
Note that we might use different input/file(s) to compile with your program, so you should make sure that it is a flexible solution.