public class Card
extends java.lang.Object
Constructor and Description |
---|
Card()
A default constructor that sets card name to -1 and the suit to
null.
|
Card(int card,
Suits suit)
A Constructor that takes an integer for the card name and a suit
for the card itself.
|
Modifier and Type | Method and Description |
---|---|
int |
getCardName()
A method that returns card name.
|
Suits |
getSuit()
A method that returns the suit.
|
void |
setCardName(int cardName)
A method that sets the card name.
|
void |
setSuit(Suits suit)
A method that sets the suit.
|
java.lang.String |
toString()
A toString method that returns a string for each card depending
on their set number from cardName.
|
public Card()
public Card(int card, Suits suit)
card
- The designated card namesuit
- the suit the card will bepublic int getCardName()
public void setCardName(int cardName)
cardName
- The desired cardNamepublic Suits getSuit()
public void setSuit(Suits suit)
suit
- The desired suitpublic java.lang.String toString()
toString
in class java.lang.Object