//************************************************************ // // Hand.Java Authors: APCS A class 2019 // // Provides an implementation of a hand of cards using a // set to represent the cards // //************************************************************ //import jss2.*; //import jss2.exceptions.*; import java.util.*; public class Hand { private ArrayList cardsInHand; /********************************************************** Constructs a hand of Cards. Initialize the Arraylist as an empty List **********************************************************/ public Hand() { } /********************************************************** To reduce hand when newcard makes Hand go over 21 and there is an ace in the hand. Change one Ace in the hand from a value of 11 to a value of 1 **********************************************************/ public void changeAce() { }//end changeAce /********************************************************** To check if there is an ace in the hand that has a value of 11. **********************************************************/ public boolean hasAce() { } /********************************************************** To check if this is a BlackJack. A BlackJack is a two card hand that has a value of 21. Return true if this is a BlackJack, false if not. **********************************************************/ public boolean isBlackJack() { } /********************************************************** Adds a new card to the hand. @param c the Card to be added to the Hand **********************************************************/ public void addCard(Card c) { } /********************************************************** Returns the value of this hand. **********************************************************/ public int value() { } /********************************************************** Returns the ArrayList of Cards in this hand. **********************************************************/ public ArrayList getCards() { } /********************************************************** Returns a string representation of this hand. **********************************************************/ public String toString() { String result=""; int cardNumber=0; for(Card c : cardsInHand) { result += "card"+cardNumber+": "+c.getvalue()+"\n"; cardNumber++; } return result; } }//end Hand