Card Game
This series of labs require you to write program code to use the following topics. Tutorials for available topics have been linked.
Data, Data, Data...
We are creating a card game. We will need a deck of cards. Create the following:
- An enum called
Suit
with values: HEARTS
, DIAMONDS
, SPADES
, and CLUBS
.
- An enum called
CardFace
with values: ACE
, TWO
, THREE
, FOUR
, FIVE
, SIX
, SEVEN
, EIGHT
, NINE
, TEN
, JACK
, QUEEN
, and KING
. The CardFace
enum has:
int cardValue
that will store the value 5
for TWO
through NINE
; 10
for JACK
, QUEEN
, and KING
; 15
for ACE
.
boolean isFace
that is true
for JACK
, QUEEN
, and KING
; false
for all other values.
- A
Card
record with a Suit
and CardFace
.
- A
Deck
class with an ArrayList
of filled with 52 cards: ACE
through KING
for each Suit
value.
Need help? Consult the following tutorials: