be adding all the cards
public class PokerAnalysis implements PokerAnalyzer {
privateList<Card>cards;
privateint[]rankCounts;
privateint[]suitCounts;
/**
* 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
*/
publicPokerAnalysis(List<Card>cards){
this.cards=newArrayList<Card>();
this.rankCounts=newint[Rank.values().length];
this.suitCounts=newint[Suit.values().length];
thrownewUnsupportedOperationException();
}

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









