Hand.java
define a Hand class, that is a set of cards held by a player.This class also keeps an ArrayList of cards and should support thefollowing API:
public Hand(int m) //specifies initial size of hand
public Card drawNext() //draws “next” card from hand
public Card draw(String s)
//draws specific card from hand, in format “8s”, “1c”, “11h”,”13d”
public void addCard(Card c) //adds card to hand
public ArrayList getCards() // gets the list of Cards inhand
Custom Exception classes
Define the following custom exception classes, and throw them atappropriate places in the preceding classes:
CardException extends RuntimeException
DeckOrHandEmptyException extends CardException
InvalidCardException extends CardException
CardPlayer.java
define the abstract class CardPlayer , with the followingAPI:
public CardPlayer(String name)
PayPal Gateway not configured
PayPal Gateway not configured