CSC 331 coding conventions

  1. Class names must begin with upper case letters.
  2. Variable names must begin with lower case letters.
  3. Method names  must begin with lower case letters.
  4. If a name consists of multiple words, capitalize the first letter of each subsequent word. For example, lastName.
  5. All instance variables must be declared private.
  6. Choose reasonable, defensible, descriptive names for variables. 
  7. Use a consistent format for your code. Eclipse can format your code for you. See Source/Format on the menu.
  8. Declare variables with the proper scope. For instance, do not use an instance variable where a local variable will do.
  9. Typically, loop index variables are named i,j,k etc. Follow this convention.
  10. Follow the format shown here for Javadoc comments. Here is another page that presents basic ideas about good formats for Javadoc.