Provide an enum Rank
and an enum Suit
for denoting playing cards. Implement the method Rank.describe
so that, for example,
Rank.TEN.describe(Suit.SPADES)
returns "Ten of spades"
.
Use enum constants ACE
, TWO
, . . ., TEN
, JACK
, QUEEN
, KING
and HEARTS
, DIAMONDS
, CLUBS
, and SPADES
.
Also produce a method Suit.faceValue
that yields the value (Ace = 1, 2 - 10 = the numeric value, Jack, Queen, King value 10).