Question
In C++ Write a program that will operate on a deck of 52 cards. Your program will: 1. Deal them into four random hands of
In 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. BONUS: 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started