Code Style Recommendations

Before committing your code (submitting your homework for review), check whether you've covered the following points:

  1. The code must be formatted (Ctrl+Alt+L).
  2. Classes must be organized into packages.
  3. The code may only contain documenting comments.
    /**
     * This program does such and such
     */
  4. The code must NOT contain unnecessary package imports.
  5. The code must NOT contain redundant blank lines.
  6. Identifier names must follow naming conventions.
  7. Class fields should be made private.
  8. Access to class fields is provided through getters and setters.
  9. Methods and constructors must have access modifiers. If a method is only used by other methods of the same class, declare it as private.
  10. Within a class, it's recommended to declare static fields and instance fields first, then constructors, getters, and setters, then all other methods.
  11. Use constants instead of magic numbers.
  12. It's good practice to override toString, equals, and hashCode in the classes you create.
  13. To avoid cluttering your code with getters, setters, and standard methods like toString, equals, and hashCode, you can use Lombok.