CMSC 106 Project #0 Fall 2002


Due date: Wednesday, September 18th, before 11:00 pm

Purpose

The purpose of this project is to get you comfortable with our UNIX system and the basic structure of a C program file. You will also be required to setup the UNIX class cluster (detective cluster) account you were assigned by the TA of your section.

Project description

For this project assignment, you must:

  1. Run the UNIX ``chfn'' command so that it at least reflects your real name (all other information is optional). You must be clearly identifiable by the name appearing in your finger information. A nickname or first or last name only is insufficient.

    Be sure to change your account password while you are logged on as well. See the posted UNIX tutorial for information about selecting a password, and a further explanation of the chfn command. Note that if you have logged in using ``ssh'', you may have to run the command ``dce_login'' in order to change your password and finger information. (``dce_login'' will ask you to type in your login id and current password.)

  2. Run the class ``setup'' command so that your account will be officially associated with this course. Running this command will allow you to use the submit program, automatically display the message of the day, and initialize several other useful things. When the script runs, be sure to note the number you are given as your unique identifier - this information will be needed by the next step of this project. If you forget to write down the number or lose it before submitting the project, you can run the setup command again to get the number. To run the ``setup'' script, type:
    
            source ~XX106001/setup
    
    (Where ``XX'' is either ``fe'', ``bp'', or ``ss'', depending on whether your instructor is Fawzi Emad, Brian Postow, or Steve Scolnik.)

  3. Use the text editor to create a small C program (it doesn't matter what name you give it as long as it ends in .c). The source file must compile and run using the ``cc -std1 -trapuv'' UNIX command as described in lab secton. The compiling will create an executable file (named ``a.out'' by default). Once the executable file is created and run, the program should print the following information to the screen, one item listed on each line of output. The C source file must be correctly formatted and well documented for readability. Both of these are further described below. Each of the lines of output should have a label to describe the information being given in that line (see the ``sample output'' section).


    1. the first line of output should print your full name, last name first.

    2. the second line should print the unique identifier you recieved when you ran the setup command (in the previous step).

    3. the third line is where you will state your ``quest''. Tell us everything anyone would ever want to know about your goals in life. You may write as much or as little as you want.

    Submit this file with the submit command, as described in the ``Submitting your project'' section below, using project number 0. Note that you are supposed to submit the C source file. Make sure you are not submitting the executable version of the file.

Project requirements

All your C programs in this course should be written in ANSI C, which means they must compile and run correctly with ``cc -std1 -trapuv'' on the OIT UNIX Class Cluster. Even if you already know what they are, you may not use any C language features other than those introduced in Chapters 1 and 2 of your textbook, plus those presented in lecture while these chapters were covered.

Your program must have a comment near the top which contains your name, login ID, student ID, your section number, your TA's name, and an original description of the action and operation of the program. Do not put your alias in this comment! Your program should be written using good programming style and formatting, as discussed in class and throughout your textbook. For this project, style is considered to consist of:


Developing your program

A crucial part of the material to be learned in this course is how to properly develop programs and find the inevitable errors you will make while writing them. This section addresses how to do that. It is not up to the instructional staff to find every error in your program; you need to learn how to find and fix most of them for yourself. If you have tried the techniques below and have still not been able to find or correct a problem, bring a printout of your program (plus printouts of any compiler errors or execution results) to our office hours, and we will be able to help you.

Keep one or two backup copies of your program saved under different filenames or in different subdirectories of your account. Before making any major changes to your program, copy it to a new backup file with a different name. This will save you a lot of time if you accidentally delete your file, or if it turns out that your changes were incorrect and you want to quickly revert to the previous version without having to undo all of your modifications by hand.

Always start all your projects as soon as they are assigned! If you end up having a problem which you can't solve on your own you will have plenty of time to come to office hours for help. If you wait until right before a project is due and you run across such a problem it's too late to get help without having to submit your project late and lose credit.

Academic integrity statement

Any evidence of unauthorized use of computer accounts or cooperation on projects will be submitted to the Student Honor Council, which could result in an XF for the course, suspension, or expulsion from the University. Projects are to be written INDIVIDUALLY. For academic honesty purposes, projects are to be considered comparable to a take-home exam. Any cooperation or exchange of ideas which would be prohibited on an exam is also prohibited on a project assignment, and WILL BE REPORTED to the Honor Council.


VIOLATIONS OF ACADEMIC HONESTY INCLUDE:


  1. failing to do all or any of the work on a project by yourself, other than assistance from the instructional staff.

  2. using any ideas or any part of another student's project, or copying any other individual's work in any way.

  3. giving any parts or ideas from your project, including test data, to another student.

  4. having programs on an open account or on a PC that other students can access.

  5. transferring any part of a project to or from another student or individual by any means, electronic or otherwise.


IT IS THE RESPONSIBILITY, UNDER THE UNIVERSITY HONOR POLICY, OF ANY STUDENT WHO LEARNS OF AN INCIDENT OF ACADEMIC DISHONESTY TO REPORT IT TO THEIR INSTRUCTOR.

Submitting your project

Your project must be electronically submitted by the date above, before 11:00 pm, to avoid penalty as described on the syllabus. No projects more than two days late will be accepted for credit without prior permission or a valid medical excuse, as described on your syllabus. Only the project which you electronically submit, according to the procedures provided, can be graded; it is your responsibility to test your program and verify that it works properly before submitting. Lost passwords or other system problems do not constitute valid justifications for late projects, so do not put off working on your program or wait to submit it at the last minute!

Turn in your assignment using the ``submit'' program provided by your instructor. You are to submit only the .c file containing your source code, not the executable version of your program!

If the source code that prints your personal information was in a file named ``myinfo.c'', submit would be run to turn it in as shown:


% submit  0  myinfo.c

In order to execute the submit command above you must have previously run the ``setup'' command in your instructor's posting account, as described in discussion section and mentioned again below in the following section. If you do not see a message saying your submission was successful then your project was not turned in. Try again, or come to office hours for assistance.

Sample Output

name: Gates, Bill
number:  #1534
quest: Global domination.     

Class announcements- reminder

Be sure to read your instructor's class announcements every time you log in, or frequently on the class webpage, for important information which may be present. You are responsible for the content of these announcements. To be certain to never miss this information, and so you can submit your projects, you must execute the command source ~<instacctID>/setup which will cause these announcements to be displayed whenever you log in (where <instracctID> must be replaced by the name of your instructor's class posting account). This only needs to be done once for the semester, and the announcements will be shown every time you log on afterwards.



Steve Scolnik
2002-09-09