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:

  1. picking the suit of the card
  2. 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

  1. Your program shall behave exactly as the Solution Demo above.
  2. Use a function to randomly pick the suit of the card
  3. Use a function to randomly pick the value of the card
  4. Make use of switch statement in these two functions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!