Class PlayingCard
java.lang.Object
|
+--Card
|
+--PlayingCard
- public class PlayingCard
- extends Card
The PlayingCard class extends the basic Card class to add
the graphics features that represent front and back images
of the card.
- Version:
- 1.0, 3 July 2001
- Author:
- James A. Webb, mrjavahack@yahoo.com
| Fields inherited from class Card |
ACE, CLUB, DIAMOND, EIGHT, FIVE, FOUR, HEART, JACK, KING, NINE, QUEEN, SEVEN, SIX, SPADE, TEN, THREE, TWO |
|
Constructor Summary |
PlayingCard()
The no-argument constructor sets all the PlayingCard's
variables to default values. |
PlayingCard(java.lang.String cardName,
java.lang.String cardSuit)
This basic constructor sets the PlayingCard's name and suit. |
PlayingCard(java.lang.String cardName,
java.lang.String cardSuit,
java.lang.String cardFront,
java.lang.String cardBack)
This constructor sets the PlayingCard's name, suit, front,
and back images. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PlayingCard
public PlayingCard()
- The no-argument constructor sets all the PlayingCard's
variables to default values.
PlayingCard
public PlayingCard(java.lang.String cardName,
java.lang.String cardSuit)
- This basic constructor sets the PlayingCard's name and suit.
- Parameters:
cardName - the name of the PlayingCard as a String.cardSuit - the suit of the PlayingCard as a String.
PlayingCard
public PlayingCard(java.lang.String cardName,
java.lang.String cardSuit,
java.lang.String cardFront,
java.lang.String cardBack)
- This constructor sets the PlayingCard's name, suit, front,
and back images. The images parameters are the
filenames of .gif or .jpg image files.
- Parameters:
cardName - the name of the PlayingCard as a String.cardSuit - the suit of the PlayingCard as a String.cardFront - the name of the front image file as a String,
such as "aceofspades.jpg".cardBack - the name of the back image file as a String,
such as "bicycle.jpg".