Question
C++ The name of the card game Bridge comes from Russian Whist, called biritch, meaning announcer or herald. Bridge players announce their contract bids. The
C++ The name of the card game Bridge comes from Russian Whist, called "biritch," meaning announcer or herald. Bridge players announce their contract bids. The game of bridge begins with shuffling and dealing a bridge hand. A bridge deal divides a 52-card deck into four hands of 13 cards each. The hands are labeled North, East, South and West. A bridge deck has four suits: Clubs, Diamonds, Hearts, and Spades. In each suit, the cards are labeled Ace, King, Queen, Jack, 10, 9, ..., 2. Major bridge tournaments play with computer-generated hand.
Specific Instructions
Write a program that initializes a deck of cards and simulates shuffling it and dealing a bridge hand. This involves dealing 5 cards to each player in the first round followed by two rounds of 4 cards each. Also, the user should be allowed repeated attempts for as long as the user desires. You are to use STL containers and algorithms that you find appropriate. In particular, you are required to use at least one container, and one algorithm to implement this problem. Use of iterators is highly encouraged. Kindly remember that the STL algorithm is not a method of the container. Additionally, attempt to eliminate all loops (e.g. for or while loops) from the application.
Implement this problem using another container to compare the performance of different containers. You have to collect real data using clock() from ctime library. Your diver program will time the executions using both containers and display the output and time taken by each container
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