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
3 points - 1) Named the files proj1.c, dates.c & dates.h (1 pt ea)
2 points - 2) Prints a greeting to the user
2 points - 3) Has #defines for MIN, MAX, MINYEAR, & MAXYEAR
2 points - 4) Has #defines for the 4 menu choices: JULIAN, AGE,
SIGN & QUIT
5 points - 5) Correctly calculates the Julian Date
5 points - 6) Correctly calculates Age
5 points - 7) Prints correct Sign for the entered date
1 point - 8) Prints an error message for incorrect menu choice
Design
2 points - 9) Uses a do-while loop in main()
3 points - 10) Uses a switch statement for menu choices
10 points - 11) Has each of the specified functions (1 pt ea)
10 points - 12) Each function does what it should per spec (1 pt ea)
Style
-5 5 points - Use of adequate whitespace
13a) Separates logical sections of code with
blank lines
13b) Blank spaces around operators
13c) Identation is only 3 to 4 spaced deep per level
-5 5 points - Indentation of comments evenly with the surrounding
code
14a) Comments should line up exactly above the
code being commented
14b) Endline comments should only be used for
variables or #defines
5 points - Use of either Student or Bell Labs indentation style
as per Indentation styles found on 201 web pages
15a) Uses one acceptable style consistently
15b) Uses braces for if/while/for clauses even if
only 1 statement
5 points - 16) Use of meaningful variable names
5 points - Use of naming conventions per CS201 Style sheet
17a) Separate "words" within identifiers with
underscores or mixed upper and lower case
17b) Variable names begin with lowercase
17c) Function names begin with uppercase
17d) #defines and typedefs all uppercase
Documentation
5 points - 18) The file header comment has filename, author,
date, section #, and email address (1 pt ea)
5 points - 19) Adeq. file descrip. given in file header comment
10 points - 20) Every function has a function header comment per
standards (1 pt each)
5 points - 21) 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-concieved, general, flexible design
----------------------------------------------------------------------------
Pts. lost: -10
Score: 90/100
----------------------------------------------------------------------------
Comments:
-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.
13a) 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--;
}
-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.