public final class Card
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
private java.lang.String |
faceValue |
The face value of this card.
|
private static java.lang.String[] |
faceValues |
The possible face values of the card.
|
private java.lang.String |
suit |
The suit of this card.
|
private int |
value |
The numerical value of this card.
|
| Constructor | Description |
|---|---|
Card(int value,
java.lang.String suit) |
Constructs a new
Card. |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getFaceValue() |
|
java.lang.String |
getSuit() |
|
int |
getValue() |
|
java.lang.String |
toString() |
private final java.lang.String faceValue
private final int value
private final java.lang.String suit
private static final java.lang.String[] faceValues
public Card(int value,
java.lang.String suit)
Card.value - The value of this card.suit - The suit of this card.public java.lang.String getFaceValue()
public int getValue()
public java.lang.String getSuit()
public java.lang.String toString()
toString in class java.lang.Object