Question
In C++ Write a card class. Card should at least have suit and value. Write a deck class. Deck is a collection of cards. Deck
In C++
Write a card class. Card should at least have suit and value.
Write a deck class. Deck is a collection of cards. Deck class should offer functions like add/remove card, Shuffle, and draw card.
Add 4 ACE and 4 KING to the deck. (4 cards of same value should have different suit) Draw two cards from the deck. First card should be an ACE. If it's not, put the cards back in deck and redraw until the first card is an ace.
Do 1,000,000 simulation of the ACE KING game and record the result of each simulation to a file. In the end, solve for the probability of drawing an ACE given first card is an ACE. Write the probability to a file. Comment on the result.
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