Define two enumerations for a standard deck of playing cards, one to represent the four suits—spades, clubs, diamonds, and hearts—and another to represent the values of the cards—ace, two, three, … , jack, queen, king. Next, design and implement a class Card using your enumerations. The constructor should create an object with a randomly selected suit and value. Using Card, implement a guessing game, similar to CoinToss, that picks a card, asks the user to guess the outcome, and reports the results.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here