public class Card
extends java.lang.Object
Constructor and Description |
---|
Card(java.lang.String suit,
int value)
Constructs a card with the given suit and given value
See class comment for what values suit and value should take.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSuit()
Returns the suit of this card
|
int |
getValue()
Returns the value of this card.
|
java.lang.String |
toString()
Returns a String representation of this card.
|
public Card(java.lang.String suit, int value)
suit
- - Suit of cardvalue
- - Numeric value for card (see class comment)public java.lang.String getSuit()
public int getValue()
public java.lang.String toString()
toString
in class java.lang.Object