CSCI 152: Operating Systems Programming

Documentation Requirements for Projects

Documentation of Code is required for all projects in the form of comments.  

Lack of documentation or bad documentation will result in up to a 20% penalty.
 

NOTE: If you do your project in Java you must use javadoc tags and turnin the generated javadoc html.



*******YOU SHOULD READ THE SOFTWARE ENGINEERING GUIDELINES INCLUDED WITH YOUR SYLLABUS!*******


Examples of Required Documentation

/********************************************************************
 * name of file
 * programmer name(s)
 * some kind of date (last modified, date created)
 * CSCI 152 - Section #
 *
 * Description:
 *         Here is a description of this file or class which should be a couple to a few lines long
 *         and explains what this class does in plain words as if you were explaining how
 *         this part of the program worked to a friend.  Pseudo code can also be included here.
 ********************************************************************/

/********************************************************************
 * name of function
 *
 * description:
 *         Here is a description of this function or method which should be between a couple
 *         lines long and explains what this class does in plain words as if you were
 *         explaining how this part of the program worked to a friend.
 *
 * Parameters:
 *        name - name of student
 * Returns:
 *        letter grade student recieved in course
 ********************************************************************/

int total = 0;  // stores the result when calculating the total number of widgets
String name;  // holds the name of the server to connect to

Some psuedo-code would be helpful, either mixed in with functional code or included in function headers.
You do not have to write psuedo-code for the whole program but you should write psuedo-code for critical parts.


smf( x, d );  //bad names, may loose points

connectToServer( server_name, port_number ); //good names


Examples of Dumb and/or Unneeded Documentation

for( int i = 0; i < 10 ; i++ )  // loop ten times
{
     print "hello";   // print hello
}

value = 7.8;  // assigning 7.8 to value
int i;  // the variable i is used in the following for loop  (this is very obvious, it does not need to be stated)
for( i = 0 ; i < 10 ; i++ )
{
       
}
// in this case "i" is much better than "for_loop_counter"
for( int i = 0; i < 10 ; i++ )  
{

}
for( int for_loop_counter = 0; for_loop_counter < 10 ; for_loop_counter++ )
{

}

More Help with Documentation