Use the ICard interface to write:

  1. A function isBlack that returns true if the card parameter is black (spades or clubs) and false otherwise:

    public boolean isRead(ICard card){ ... }

  2. In poker, a pair is two cards of the same rank, like two 2s or two Kings. Write isPair, a function that returns true if its two ICard parameters represent a pair and false otherwise.

    public boolean isPair(ICard first, ICard second){ ... }

  3. A straight is a set of cards that contains five cards of sequential rank in at least two different suits, like 10♣, 9♠, 8♦, 7♣, 6♥. Write a function isStraight that returns true if the hand contains a straight and false if it doesn't.

    public boolean isStraight(ICard[] hand){ ... }

  4. In Blackjack, the value of a hand is the total of the cards. Aces count for either 1 or 10, whichever is more advantagenous, and face cards (jacks, queens, and kings) are “worth” their getRank() value. (So: 11, 12, and 13 respectively.) Write the handTotal function that returns the total value of a hand.

    public int handTotal(ICard[] hand){ ... }