NOTE: This is only a sample to give you an idea of what to expect. The point distributions on the actual grading form will be different. Grading forms are designed specifically for each project.


CMSC 201 : Computer Science I ============================================ Project #1 - Dates Due: October 22nd, before midnight Name: IAM A. STUDENT Section # : 101 Submit date and time: Mon Oct 22 15:38:22 EDT 2000 General 5 points - Compiles/links with warnings 10 points - Use of global variables 50 points - Compiler error(s) 10 points - run-time error after complete output 25 points - other run-time error ---------------------------------------------------------------------------- Correctness (Section 1) 3 points - a) Named the files proj1.c, dates.c & dates.h (1 pt ea) 2 points - b) Prints a greeting to the user 2 points - c) Has #defines for MIN, MAX, MINYEAR, & MAXYEAR 2 points - d) Has #defines for the 4 menu choices: JULIAN, AGE, SIGN & QUIT 5 points - e) Correctly calculates the Julian Date 5 points - f) Correctly calculates Age 5 points - g) Prints correct Sign for the entered date 1 point - h) Prints an error message for incorrect menu choice Design (Section 2) 2 points - a) Uses a do-while loop in main() 3 points - b) Uses a switch statement for menu choices 10 points - c) Has each of the specified functions (1 pt ea) 10 points - d) Each function does what it should per spec (1 pt ea) Style (Section 3) -5 5 points - Use of adequate whitespace a) Separates logical sections of code with blank lines b) Blank spaces around operators c) Indentation is only 3 to 4 spaces deep per level d) Code should fit in a max screen width of 80 chars -5 5 points - Indentation of comments evenly with the surrounding code e) Comments should line up exactly above the code being commented f) Endline comments should only be used for variables or #defines and should be lined up with each other 5 points - Use of either Student or Bell Labs indentation style as per Indentation styles found on 201 web pages g) Uses one acceptable style consistently h) Uses braces for if/while/for clauses even if only 1 statement 5 points - i) Use of meaningful variable names 5 points - Use of naming conventions per CS201 Style sheet j) Separate "words" within identifiers with underscores or mixed upper and lower case k) Variable names begin with lowercase l) Function names begin with uppercase m) #defines and typedefs all uppercase Documentation (Section 4) 5 points - a) The file header comment has filename, author, date, section #, and email address (1 pt ea) 5 points - b) Adeq. file descrip. given in file header comment 5 points - c) Every function has a function header comment per standards 5 points - d) .h file is a user interface - Every function prototype has a function header comment 5 points - e) Adequate descriptive comments within the code Extra Credit 1-10 points At the discretion of the grader for one or more of a. outstanding documentation b. efficient or clever algorithm c. well-conceived, general, flexible design ---------------------------------------------------------------------------- Pts. lost: -10 Score: 90/100 ---------------------------------------------------------------------------- Comments: 3d) Keep your lines of code within 80 chars wide. If you have a line that wraps around break it up into two lines. For example: printf("Your age is: %d\n", FindAge(month, day, year, birthMonth, bir thDay, birthYear)); should be: printf("Your age is: "); printf("%d\n", FindAge(month, day, year, birthMonth, birthDay, birthYear)); Do the same with comments. 3a) You could have used some blank lines and comments to separate sections of code, especially within the case statement in main. Perhaps between getting the current day info and the birthday info. In your functions, you do a better job of putting comments above sections, but could use some blank lines. For example: /* Set age to be the difference between birthYear and currentYear */ age = currentYear - birthYear; /* If the person's birthday has not come yet this year, subtract 1 from age */ if(currentMonth < birthMonth) { age--; } should be: /* Set age to be the difference between birthYear and currentYear */ age = currentYear - birthYear; /* If the person's birthday has not come yet this year, subtract 1 from age */ if(currentMonth < birthMonth) { age--; } 3f) Make sure that your variable declaration endline comments always line up. You did this okay in main but didn't in your functions. For example: int i; /* for loop variable */ int julianDate = 0; /* julian date */ should be: int i; /* for loop variable */ int julianDate = 0; /* julian date */ Unfortunately, there is no partial credit for the first project, so even if you only slip up once, you still have to lose all of the points.