2. Design and implement a Card and Deck class 3. Use these classes to write test
ID: 3610444 • Letter: 2
Question
2. Design and implement a Card and Deck class3. Use these classes to write tests which experimentally validatethe probabilities of drawing a flush(all the same suit).
In c++ please
so basically i need a program that has a deck and card class. The user should be able to draw five card hands from the deck classand program will recognize and see if its a flush. Theprobability should be recorded like flushs/attempts. Afterthe 52 card deck is depleted the program should read "deckdepleted."
good luck =)
Explanation / Answer
please rate - thanks #include #include #include using namespace std; void shuffle(int[][2]); void dealcards(int[][2],int[][2],int&); int checkflush(int[][2]); int main() { int i=0,j,flushes,deck[52][2],totalflushes=0; int hands[5][2],totalhands=0,cards=0; string suit[4]={"hearts","diamonds","spades","clubs"}; stringcard[13]={"ace","2","3","4","5","6","7","8","9","10","jack","queen","king"}; srand(time(0)); shuffle(deck); coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.