Question: C++ Programming The program will pull a card from a deck of 52 regular playing cards (with suits: heart, spade, diamond, club; and values: A,
C++ Programming
The program will pull a card from a deck of 52 regular playing cards (with suits: heart, spade, diamond, club; and values: A, 2, 3,..., 10, J, Q, K). Example card outputs:
- 2C (represents Two of Clubs)
- AS (represents Ace of Spades)
- TD (represents 10 of Diamonds)
The program will allow the user to repeatedly pulling a card until he or she wants to end the program.
Design your program with two functions which will involve a switch statement. They will be used for:
- picking the suit of the card
- picking the value of the card
Solution Demo
Let's pull a card! This time we got KS Wanna pull a card again? y This time we got 2S Wanna pull a card again? y This time we got JH Wanna pull a card again? n
Requirements
- Your program shall behave exactly as the Solution Demo above.
- Use a function to randomly pick the suit of the card
- Use a function to randomly pick the value of the card
- Make use of switch statement in these two functions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
