Modifier and Type | Field and Description |
---|---|
private int |
tenacity
RedMartians have an
tenacity which is simply an integer. |
Constructor and Description |
---|
RedMartian(int id,
int tenacity)
Creates a RedMartian with the specified
id and tenacity
and volume is set to 1. |
RedMartian(int id,
int volume,
int tenacity)
Creates a RedMartian with the specified
id , volume , and tenacity . |
Modifier and Type | Method and Description |
---|---|
int |
getTenacity()
Returns the
tenacity for the Martian. |
String |
speak()
Returns a string like:
|
String |
toString()
Returns a string like:
|
public RedMartian(int id, int tenacity)
id
and tenacity
and volume is set to 1.id
- public RedMartian(int id, int volume, int tenacity)
id
, volume
, and tenacity
.id
- volume
- tenacity
-