Question: 2 public interface BlackjackEngine ( 3 public static final int DRAN 4 public static final int LESS THAN 21 2; 5 public static final int
2 public interface BlackjackEngine ( 3 public static final int DRAN 4 public static final int LESS THAN 21 2; 5 public static final int BUST 6 public static final int BLACKJACK 17 public static final int HAS 21 18public static final int DEALER WON 19 public static final int PLAYER WON 2 public static final int GAME IN PROGRESs 8; 21 22 /** 23 24 *@return number of decks 25 26 public int getNumberOfDecks ) 27 Returns the number of decks being used. 29 1 30 31 : Creates and shuffles the card deck(s) using a random number generaor. 32 public void createAndShuffleGameDeck) 34 35 * Returns the current deck of cards. 36 37 38 39 public Card[] getGameDeck); ereturn Card array representing deck of cards. 40 41 42 ** 43 Creates a new deck of cards, and assigns cards to the dealer and player. * A total of four cards are dealt in the following order: " Player (face up), Dealer (face down), Player (face up), Dealer (face up). " Once the cards have been dealt, the game's status will be GAME_IN PROGRESS. 45 46 47 48 Delete the bet amount from the account. 49 public void deal): 50 51 * 52 53 * Returns dealer's cards .@return Card array representing the dealer's cards. 55 public Card[] getDealerCards): 56 58 Returns an array representing the possible value (s) associated with the " dealer's cards if the cards represent a value less than or equal to 21. 59 ereturn Integer array representing the possible value(s) or null if cards " represent a value higher than 21. The array wi11 have a size of 1 if onl " one value is associated with the set of cards, and a size of two if two " values are possible. Por the case of an array of size two, the smaller value " must appear in the first array entry 64 65 67 public int[] getDealerCardsTotal): " Returns an integer value that can assume the values LESS THAN 21 the dealen's cards have a value less than 21
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
