ITP 1170x Project #0 Spring 2011 Due date: 1. ITP11701 - Mar 14 (Mon) 10am 2. ITP11702,703 - Mar 15 (Tue) 10am 3. ITP11704 - Mar 16 (Wed) 10am 4. ITP11705 - Mar 17 (Thu) 10am 5. ITP11706 - Mar 18 (Fri) 10am 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 account you were assigned by the AI or TA of your section. Project description For this project assignment, you must: 1. Run the UNIX “chfn” command so that it 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. 2. 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 .cpp). The source file must compile and run using the “g++ *.cpp” UNIX compiler 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). (a) the first line of output should print your full name, last name first. (b) the second line should print the unique identifier you recieved when you ran the setup command (in the previous step). (c) the third line should print an alias (or nickname) which you choose; this alias is a private identification under which your scores for all course assignments will be listed. Grades will be posted several times during the semester in the instructors’ the class webpage , so they can confirm that the grades recorded for them are correct. Only the instructors and TAs will have access to the aliases, so your grades will remain confidential. Your alias can be anything you like, but, since the posted grades can be read by all students, if you want your grades to remain anonymous you must choose an alias which can’t be connected to you (unrelated to your name or initials) and do not tell it to anyone. If you do not want your scores posted at all you should print “NO ALIAS” on this third line of output. Any alias that is to be offensive in any way, will not be accepted. Submit this file with the submit command, as described in the “Submitting your project” section below, using project number 0. Project requirements 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: ∙ neat and proper indentation and formatting ∙ writing clear and readable code ∙ using meaningful variable names 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. 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 to fix the errors and have still not been able to find or correct a problem, ask during the lab or 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. Submitting your project Your project must be electronically submitted by the date above, before 10:00 am, 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. Turn in your assignment using the “submit” program provided by your instructor. You are to submit only the .cpp 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 Sample Output % info.x name: Postow, Brian number: #1534 alias: Me