# Create a solution designed to play Blackjack

\$22.00

Category:

## Description

ITCS 1213

In this project you will create a solution designed to play Blackjack. We will use simple
rules of the game. Assume there exists a player and a dealer. The winner of the game is
the player who gets closest to 21 without exceeding 21 or “going bust”. If both players
have the same points, then neither player wins the hand. An ace has a value of 1 or 11.
Face cards have a value of 10. The dealer must take a card if the dealer’s hand is worth
16 or less. The dealer may not take a card if the hand is worth 17 or more. As the player,
you may take a card at any time.
Allow the user to play as many hands as he/she wants.
Keep track of how many hands the dealer wins and how many hands the player wins.
How to get started;
Create a class called Card. The card has three fields, value and suit, face.
The card class has a constructor that takes three values for the three fields.
Do not create a no-args constructor.
The Card class has three get methods to return the values of each of the fields.
The Card class has a toString( ) method.
The Card class has a compareTo( ) method that uses the value of the card to determine
the ordering. For this implementation the ordering is as follows: (high to low) A, K, Q, J,
10, 9, 8, 7, 6, 5, 4, 3, 2
Create a class called Deck. A deck has two fields- an array of Cards and an int which
holds the subscript of the Card at the top of the deck.
The Deck class will have only one constructor, which will create the array. Try to think
of a way to code this without writing 52 statements.
The Deck class also has a method getTopCard( ) which returns a copy of the Card that is
at the top of the array.
The Deck class has a method called shuffle( ) which shuffles the array of Cards. To
shuffle, generate random numbers and use these to exchange array elements. Exchange
1000 times in this method. If you are unsure of how to generate a random number after