Question
Using java For this project, you will need to simulate a blackjack program. When you start the game, the user will have a menu that
Using java
For this project, you will need to simulate a blackjack program.
When you start the game, the user will have a menu that lets the user to choose 1. New Deck, 2. Shuffle cards in deck, 3 Display all cards remaining in the deck, 4. play blackjack
When you start the game, give the user only $10,.
Important: you will also need a hand, deck and card classes that will have behavior and attributes of this.
Card
Attributes: suit, ranks, faceup
Behaviors: flip( ), setfaceUp( ), setfaceDown( ), Card(r,s), display( ), getValue( )
Deck
Attributes: cards, cardCount
Behaviors: shuffle( ), deal( ), Deck( ), display( ),
Hand
Attribute: cards, wallet,
Behaviors: draw(card), display( ), getValue( ),
RULES OF THE GAME
1. New Deck. 2. Shuffle cards in Deck 3. Display all cards remaining in the deck 4. Play Black Jack. Option 1 will create a new deck of playing cards. This deck of cards will be an array (please use an ArrayList not an array) of 52 cards. The order of the cards will be the same each time option one is selected. Option 2 will shuffle the cards in preparation for playing the game of Black Jack. This shuffle should mix the cards up in a random order. Also, it should shuffle however many cards are in the deck. After selecting a "New Deck" there will be 52 cards. After playing one hand of Black Jack there will be fewer cards in the deck. You should be able to shuffle just the remaining cards. Option 3 will display the all cards that are still in the deck Option 4 will play the game. Here are the rules of BlackJack: The game is played with two players which are the computer against the player. We will refer to the computer as the "Dealer". The object is to get as close as possible to 21 without going over and also try to beat the dealer's hand. The value of each card is the numeric value of the card except for face cards which have the following values Jack 10 Queen. 10 King 10 Ace 11 or 1 Rules of the game: The dealer deals one card to the player, face up and one card to himself face down. Then he deals one card to the player face up and one card to himself face up. Then he offers a card to the player. The player may accept cards from the dealer, or he may "stand" (stand means that he takes no more cards). If the player gets more than 21 points, he loses immediately. When the player stops taking cards, the dealer turns over his face down card and begins to lay down cards for himsel The dealer must continue to take cards until he gets 17 points or more, at which time he stops. If the dealer goes over 21, the player wins. If both the player and the dealer are under 21, then the one who is closest to 21 wins. If there is a tie, the player winsStep 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