/** * The constructor has been partially implemented for you. cards is the * ArrayList where you'll be adding all the cards you're given. In addition, * there are two arrays. You don't necessarily need to use them, but using them * will be extremely helpful. * * The rankCounts array is of the same length as the number of Ranks. At * position i of the array, keep a count of the number of cards whose * rank.ordinal() equals i. Repeat the same with Suits for suitCounts. For * example, if your Cards are (Clubs 4, Clubs 10, Spades 2), your suitCounts * array would be {2, 0, 0, 1}. * * @param cards * the list of cards to be added */ public PokerAnalysis(List cards) { this.cards = new ArrayList(); this.rankCounts = new int[Rank.values().length]; this.suitCounts = new int[Suit.values().length]; throw new UnsupportedOperationException(); }
/**
* The constructor has been partially implemented for you. cards is the
* ArrayList where you'll be adding all the cards you're given. In addition,
* there are two arrays. You don't necessarily need to use them, but using them
* will be extremely helpful.
*
* The rankCounts array is of the same length as the number of Ranks. At
* position i of the array, keep a count of the number of cards whose
* rank.ordinal() equals i. Repeat the same with Suits for suitCounts. For
* example, if your Cards are (Clubs 4, Clubs 10, Spades 2), your suitCounts
* array would be {2, 0, 0, 1}.
*
* @param cards
* the list of cards to be added
*/
public PokerAnalysis(List<Card> cards) {
this.cards = new ArrayList<Card>();
this.rankCounts = new int[Rank.values().length];
this.suitCounts = new int[Suit.values().length];
throw new UnsupportedOperationException();
}

Trending now
This is a popular solution!
Step by step
Solved in 3 steps









