Question: C++ Write a program that will operate on a deck of 52 cards. Your program will: 1.Deal them into four random hands of 5 cards

C++

Write a program that will operate on a deck of 52 cards. Your program will:

1.Deal them into four random hands of 5 cards each

a.The four hands need to be kept in an array for later use.

2.Sort each hand so that it shows the cards in sequence from two as the lowest to ace as the highest.

3.Display the cards in each hand using the card face (2, 10, King, etc.) and the suit (Spades, Hearts, etc.)

4.Display what you determined the hand to be. A ranking of poker hands is at http://www.pagat.com/vying/pokerrank.html

a.Straight flush

b.Four of a kind

c.Full House

d.Flush

e.Straight

f.Three of a kind

g.Two pair

h.One pair

i.Highest card

5.Each time the program is run, a different set of hands is to be dealt.

6.Determine which is the winning hand. A tie is possible. (25 points)

NOTES:

1. Use a structure to hold the face value and suit of each card.

2. Use arrays to hold the deck of cards and the hands.

3. Use enumerations for the values of Jack, Queen, King, and Ace and to identify the suits (Diamonds, Clubs, etc.).

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!