-
Notifications
You must be signed in to change notification settings - Fork 329
Contribute
Ramon edited this page May 8, 2018
·
5 revisions
You can help us translate this app into your native language by visiting SkyTube's Weblate page. Just log in using your GitHub/GitLab/BitBucket/Google/Facebook account and start translating!
- Follow the Java Code Conventions.
- Each class and method shall be properly documented.
- Code shall be maintainable -- no code copy and pasting.
- Use tabs to indent code. Each tab shall be equivalent to 4 spaces.
/**
* A detailed description of what this class does.
*
* <p>Feel free to write multiple paragraphs of comments.</p>
*/
public class Player {
/** Instance variable description */
private String name;
/** Instance variable #2 description */
private String surname;
/**
* Describe this method.
*
* @param name Player's name.
* @param surname Player's surname.
*/
public Player(final String name, final String surname) {
// add comments (especially if logic is not straightforward)
this.name = name;
this.surname = surname;
// ...etc.
}
/**
* Instance method names should be intuitive and describe what their
* function is. Horizontally, comment lines should not exceed 80 characters.
*
* <p>Methods should be separated by 3 new lines.</p>
*/
public void processPlayer() {
// description
if (condition) {
this.name = "hello";
}
}
// ...etc.
}