Overload a unary operator for the Deck class (see Programming Exercise 3.3) whose invocation results in a
Fantastic news! We've Found the answer you've been seeking!
Question:
Overload a unary operator for the Deck class (see Programming Exercise 3.3) whose invocation results in a Decks being shuffled. For example, if the bitwise complement operator ~ is overloaded, then the code slice
shuffles d
Exercise 3.3
Implement a Deck class that represents a deck of 52 cards. The public interface should include methods to shuffle, deal, display hands, do pairwise comparisons of cards (e.g., a Queen beats a Jack), and the like. To simulate shuffling, you can use a random number generator such as the library function rand.
Posted Date: