Modify the gameofclubs application so it uses just one deck


a. Create an enumeration to represent the four standard suits of cards (CLUBS, DIAMONDS, HEARTS, and SPADES). Create another enumeration for the words that represent card point-value names (TWO, THREE, and the rest of the number cards through TEN, then JACK, QUEEN, KING, and ACE). (In many card games, the ACE is considered to have a higher value than the KING.) Display the numeric suit and point-value names of all 52 cards. Save the file as CardDeck.cpp.

b. Create a Card class with data fields for suit and card point value. Include a constructor that accepts arguments for the data fields. Also include overloaded greater-than and less-than operators for comparing card values. Create an overloaded == operator; two cards are equal if they have the same suit and value. Randomly select two Card objects from a deck, making sure they are different. (Appendix E contains information on random number generation.) Display both Card objects and determine which is higher or whether they have the same value. Save the file as DealTwoCards.cpp.

c. Create a card game called Clubs. Two players each receive five randomly chosen cards. Each plays one card at a time. The higher card wins a point, but any club beats any value of another suit. For example, the five of hearts beats the three of spades, but the two of clubs beats both of them. On any turn, if both players' cards have the same value and neither is a club, then no points are awarded. Write an application in which you deal five cards to each of two players. Display each match and keep score. Save the file as GameOfClubs.cpp.

d. Modify the GameOfClubs application so it uses just one deck of cards. That is, no duplicate cards should appear during the game. Save the file as GameOfClubsOneDeck.cpp.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Modify the gameofclubs application so it uses just one deck
Reference No:- TGS02192524

Expected delivery within 24 Hours