Question: Language is C++. Please dont copy and paste previous anwswers they are all wrong. 2) Casino Blackjack (This is a long problem.) In this problem,

Language is C++. Please dont copy and paste previous anwswers they are all wrong.

Language is C++. Please dont copy and paste previous anwswers they areall wrong. 2) Casino Blackjack (This is a long problem.) In this

2) Casino Blackjack (This is a long problem.) In this problem, you will use the DeckofCards class created in the previous exercise to construct a simulation program that determines how frequently the dealer will go "bust" when play ing the casino game "Blackjack". The simulation involves dealing a large number of Blackjack hands according to the dealer-rule "stand on soft-17" and reporting the frequencies of various scor- ing outcomes In this version of Blackjack, a player initially receives 2 cards and optionally draws 1, 2 or 3 more in an attempt to bring the total value of the cards as close as possible to 21 without going over. To determine the value of the hand, the cards labeled 2 through 10 are scored respectively 2 through 10 points each, so-called "Face cards" (jack, queen, and king) are scored as 10 points, and the ace can count as either 1 or 11, whichever is better for the player. If the score is over 21 the player loses (the player is "busted"), regardless what the dealer does. When played in a casino, the dealer plays according to fixed rules. For this simulation, we'll assume the casino employs the "stand on soft-17" rule that is more advantageous for the player. Regardless the player's score, the dealer is required to continue drawing cards until his/her hand achieves a value of 17 or more, or goes bust. Since an ace counts as either 1 or 11 points, each ace results in two possible scores for a hand. A "soft score" is a score that includes one or more aces. For example, ace-ace-3-2 could be one of three possible scores: 27 (busted), 17 (soft-17), or 7. The actual "score" of a soft hand is the largest score that is less than or equal to 21; in this case 17. There fore, ace-ace-3-2 is an example of a "soft-17" and would require the dealer to stop taking cards Write a program that does the following Includes a function, scoreDealer () that takes an array of integers representing a Blackjack hand" and an integer number of cards as arguments and returns the dealer's score. If the hand is a "soft hand", your function must determine the largest soft score less than 21 (one or more aces counted as 1). If that is not possible, your function should return the lowest score over 21 with all the aces in the hand counted as 1. Using the DeckOfCards object, deal 10,000 Blackjack hands with the "stand on soft-17" rule (i.e. for each hand, continue to deal cards until the score reaches 17 or more). Your program must call the scoreDealer() function to determine the score of each hand as it is dealt. 2) Casino Blackjack (This is a long problem.) In this problem, you will use the DeckofCards class created in the previous exercise to construct a simulation program that determines how frequently the dealer will go "bust" when play ing the casino game "Blackjack". The simulation involves dealing a large number of Blackjack hands according to the dealer-rule "stand on soft-17" and reporting the frequencies of various scor- ing outcomes In this version of Blackjack, a player initially receives 2 cards and optionally draws 1, 2 or 3 more in an attempt to bring the total value of the cards as close as possible to 21 without going over. To determine the value of the hand, the cards labeled 2 through 10 are scored respectively 2 through 10 points each, so-called "Face cards" (jack, queen, and king) are scored as 10 points, and the ace can count as either 1 or 11, whichever is better for the player. If the score is over 21 the player loses (the player is "busted"), regardless what the dealer does. When played in a casino, the dealer plays according to fixed rules. For this simulation, we'll assume the casino employs the "stand on soft-17" rule that is more advantageous for the player. Regardless the player's score, the dealer is required to continue drawing cards until his/her hand achieves a value of 17 or more, or goes bust. Since an ace counts as either 1 or 11 points, each ace results in two possible scores for a hand. A "soft score" is a score that includes one or more aces. For example, ace-ace-3-2 could be one of three possible scores: 27 (busted), 17 (soft-17), or 7. The actual "score" of a soft hand is the largest score that is less than or equal to 21; in this case 17. There fore, ace-ace-3-2 is an example of a "soft-17" and would require the dealer to stop taking cards Write a program that does the following Includes a function, scoreDealer () that takes an array of integers representing a Blackjack hand" and an integer number of cards as arguments and returns the dealer's score. If the hand is a "soft hand", your function must determine the largest soft score less than 21 (one or more aces counted as 1). If that is not possible, your function should return the lowest score over 21 with all the aces in the hand counted as 1. Using the DeckOfCards object, deal 10,000 Blackjack hands with the "stand on soft-17" rule (i.e. for each hand, continue to deal cards until the score reaches 17 or more). Your program must call the scoreDealer() function to determine the score of each hand as it is dealt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!