Question
C++ ONLY 50 points Create a standard deck of 52 playing cards and list those cards on the screen, columns makes my life easier :-)
C++ ONLY
50 points
Create a standard deck of 52 playing cards and list those cards on the screen, columns makes my life easier :-) Pause or "press Enter" after the unshuffled deck is displayed. The display might look something like.
"Shuffle" the deck and list the shuffled deck on the screen. random_shuffle from
Sort (by rank) and evaluate evaluate the first 5 cards of the deck as a 'hand'. Print the unsorted, then the sorted hand.
a pair (say the card rank, like Pair of Queens)
two pair (say something like Pair of Queens and Pair of Twos)
three of a kind (say something like Three Kings)
full house (say something like Full house, Jacks over fours)
straight (say Ace-high straight) A straight is all 5 cards in rank order, ace can be high or low
four of a kind
flush (say something like spades flush)
Ideas:
create a Card class with an internal 'Rank' (A, 2, 3, 4, ..) and 'Suit' (spades, diamonds ...)
Here's one possible idea for a card class (Card.h)
#ifndef CARD_H
#define CARD_H #include
If you want to use the builtin sort alogrithm with the above class, use:
vector
For those who like icons, check out the following:
int main() { cout << "\003" << endl; cout << "\004" << endl; cout << "\005" << endl; cout << "\006" << endl; return 0; }
Please use C++!!!
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