3 private int suit;
4 private int face;
5
6 public Card() {} 7
8 /**
9 * Constructs a card object with specified suit and face
8 private String name;
9
10
11 public Player() {12 chipsAmount = 100;13 }14 public Player(int amount, String name) {
15 chipsAmount = amount;
16 this.name = name;
11 public Player() {
12 chipsAmount = 100;
13 }
14 public Player(int amount, String name) {15 chipsAmount = amount;16 this.name = name;17 }18
19 public int getChipsAmount() {
20 return chipsAmount;
This constructor does not have any documentation.
Consider adding a documentation comment to explain its use.
While it may seem like the usage of a constructor is perfectly obvious, any consumers of your API may not be able to pick up on certain details.
In the example below, it is difficult to understand what the arguments of this constructor for DataForwarder
signify.
class DataForwarder {
public DataForwarder(int nTypes, String... values) {
// ...
}
}
Document the constructor and provide useful information about it or its parameters as required.
/**
* Initializes a DataForwarder with a set of types to filter by, along with their names.
*
* @param nTypes - The number of types to filter by.
* @param values - The input type names to filter by.
*/
public DataForwarder(int nTypes, String... values) {
// ...
}
If you feel this constructor does not require documentation, you can add a skipcq comment to this constructor.