Question: 1. Implement a Deck class that represents a deck of cards. This Deck class must include the following methods: a. Deck( ) : the constructor
1. Implement a Deck class that represents a deck of cards. This Deck class must include the following methods:
a. Deck( ): the constructor that creates a deck of 52 cards, one of each possible suit-value combination.
b. card( ): deals a random card from the deck, where: 1) cards are dealt on a non-replacement basis (i.e. once a card is dealt it cannot be dealt again), and 2) on each deal all cards (remaining) in the deck have an equal probability of being dealt.
c. Selecting the correct data structure should make this easy to implement.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
