CSC236 Data Structures in Java
Lab Standards
You should adhere to the following rules in the programs you submit:
- No global variables. Ever.
- Global constants are ok.
- Put a comment with your name and the lab number at the top of every class.
- Put a comment at the beginning of every function except simple constructors.
- Comment any complex section of code inside a function.
- No function should be more than a page long.
- When prompting a user in a loop, tell him/her what to enter to get out of
the loop.
- Don't give an error message after the user enters a code that should exit
from a loop. Use a priming read to avoid this.
- Use meaningful variable names. Names like i, j, or k should only be used for loop counters.
Variable names like x and y should only be used for x and y in
mathematical programs.
- Don't write infinite loops with a break inside. Use the condition which causes
the break as the loop condition. Infinite loops with breaks make your code
very hard to read.
Email Me |
Office Hours |
My Home Page |
Department Home |
MCC Home Page
© Copyright Emmi Schatz 2009