Style Guide for CS 139


This Style Guide should be used as a reference for all work turned in for credit, both labs and programming assignments.  It is based on standard java coding guidelines.  See http://developers.sun.com/sunstudio/products/archive/whitepapers/java-style.pdf for a complete java guide.

Names - All names should be descriptive and readable.  subTotal rather than s, grade rather than grd.  Multiple word names should use either a Capital letter or underscore (_) to separate words (not both).  subTotal or sub_total.
Declarations - Where and when to declare variables
Indentation - Provides a visual structure for your program.
Operators
Structure

Comments - Comments provide a guide to what the program is doing.  
Header - every source file must contain the following in its header.
/***************************************************************************
* Overall description of the class goes here
*
* @author Your name goes here
* @version Vn - date
*  Description of the assignment (ex: Lab1, PA1 - Mile conversion)
***************************************************************************/

Programming Assignments - Every programming assignment must contain the following statement or must cite any sources used (such as a TA).
/***************************************************************************
* References and Acknowledgements: I received no outside help with this
* programming assignment
*
 ***************************************************************************/
OR
/***************************************************************************
* References and Acknowledgements: TA Glenn helped me with the foo method.
*
 ***************************************************************************/

Methods - All methods must contain a header which contains the following if applicable.  Make sure that you do not give
an @param or @return tag for methods that take no parameters or which do not return a value.
/***************************************************************************
* Overall description of the method goes here
*
* @param paramterName Describe each input parameter, must have one @param line for each
* @return Describe the value that this method returns.
*  Description of the assignment (ex: Lab1, PA1 - Mile conversion)
***************************************************************************/

Miscellaneous