Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a program to simulate the BlackJack game. Rules: Use 52-card decks. Aces is counted as 1 or 11 (depending on the total value of

Design a program to simulate the BlackJack game.

Rules:

  1. Use 52-card decks.
  2. Aces is counted as 1 or 11 (depending on the total value of the cards, chosen by the player), 2 to 9 according to pip value, and tens and face cards count as ten points.
  3. The dealer will give two cards to the player and two cards to himself (computer).
  4. Deal a card to the computer as long as the total points of the dealer is less than 17
  5. Deal a card to the player until the player says "no"
  6. The value of a hand is the sum of the point values of the individual cards.
  7. Once the player says "no more card", check the player's value. If the player bust, the computer wins automatically.
  8. Then check the computer's value. If the computer does not bust, then the higher point total between the player and computer will win. If the computer goes over 21 points, then any player who didn't already bust will win.
  9. Note 1: If there is a Aces in the player's hand, the player will choose the value for the Aces.
  10. Note 2: For the computer, if the total value is over 21, Aces will be counted as 1, otherwise, Aces will be counted as 11.
  11. Note 3: A "blackjack" is the highest hand, consisting of an ace and any 10-point card, and it outranks all other 21-point hands.
  12. Repeat the game until the player doesn't want to play. For simplification purpose, you can use a new deck for each round.

Requirements:

1. program must be well-documented

2. program must be modulerized (have methods)

4. To hold the 52 cards in the deck, you may need to use array or ArrayList.

java program and please screenshot ur code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

=+What kinds of problems need to be overcome?

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago