Coding and Styling Guidelines

In this course, your code will be expected to follow the following coding and styling guidelines.  This guide will be updated throughout the course so keep an eye on this document and ensure that your code meets the new requirements.

Javadoc Comments
All class files and methods must be documented using JavaDoc format.  Javadoc format begins with the following:
/**
and ends with 
*/
For a class, the comments have the following format:
  1. A description of the file
  2. assignment number
  3. date
  4. @author with your name
Example:

/**
 * This is a generic test class.
 * Assignment: HW1
 * Date: 03-05-2015
 * @author John O'Connor
 */

For a method inside of a class, the format is the following:
  1. A description of the purpose of the method.
  2. @param for each parameter to the method, with the type in curly braces {}
  3. @return for the return value / type from the method.
Example:
/**
 * This is a method that does something.
 * @param {String} a message to output.
 * @param {Integer} an integer to output
 * @return {boolean} whether the method was successful or not.
 */

Comments