Your code is expected to follow the guidelines below. If you do not follow these guidelines you will receive a deduction on your assignment score:
- Use lower-case letters to begin a variable or method name.
- Use upper-case letters to begin a class name.
- Use camelCase not_underscores.
- Be consistent with spacing.
variable= new Something()
is not good. variable = new Something()
is much better.
- Put one space after each comma in a parameter list.
- Put one space on either side of a binary operator.
- Do not put spaces before a semicolon.
- Be consistent with your use of the
this
keyword, especially in constructors.
- Use try-with-resources where possible.
- Use private data members unless there is a good reason to do otherwise.
- Make sure use proper indentation in all classes.
- Do not catch unchecked exceptions unless there is a very good reason. Instead, try to use conditionals appropriately to avoid unchecked (e.g., NullPointer) exceptions.
- Do not replicate code unless there is a very good reason.
- Document all of the methods and classes you create.
- Every source code file should contain a header block of documentation providing basic information about the contents and the author.
- Each class and interface, and each method in a class, should have a small header block that describes its role.
- Use in-line documentation as appropriate to clearly describe complex logic.
- Don't wait until a program is finished to insert documentation. As pieces of your program are completed, comment them appropriately.