Create a program that uses methods andallows the user to play the game of blackjack against the computer dealer.Rules of Blackjackto remember include: You need one 52 card deck of cards with cards...


Create a program that uses methods andallows the user to play the game of blackjack against the computer dealer.Rules of Blackjackto remember include:



  1. You need one 52 card deck of cards with cards from2-Ace (4 cards of each number).

  2. Jacks,Queens and Kings count as 10points.

  3. An Ace can be used as either 1or 11 depending on what the user decides during the hand.

  4. Draw randomly two cards for the "dealer" and display one of them while keeping the other hidden. Also, randomly draw two cards for the player and display them in view.

  5. Allow the user to hit (randomly draw a card) as many times as they wish. If the player "busts" or gets over 21, the dealer automatically wins the players wager.

  6. After the user "stands"or is satisfied with his total,the dealer must take a card if his total is 16 or below, and cannot take a card if his total is 17 or above.

  7. If the dealer "busts" or goes over 21, the player wins back his wager plus his wager again. (Example - if a player bets $3 he gets back his original $3 plus an additional $3).

  8. If neither the dealer or the player "busts" or goes over 21, then the highest total wins. Ties go to the dealer.

  9. Note - the player should start with $20 in the bank and cannot wager more than he currently has in the bank.

  10. Note - before each round the user can bet in whole dollars how much to wager or how much of the total in the bank to risk.


  11. Allow the user to quit at any time.Of course,the user must quit if he/she runs out of money.

  12. Remember, somehow ensure thatthe same card (example -6of spades) cannot be drawn twice in a single hand.

Nov 25, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here