Poker Game Write a method with the following header that cla
Poker Game
Write a method with the following header that classifies the hand into one of the following categories, which are listed in increasing order of rank. The method should return an integer from 1 to 17 indicating the highest of the 17 ranks below which the hand satisfies. You must remember that when considering whether a hand is a straight or straight flush, an Ace can count as either a 1 or a 14, but not both. A Royal Flush is a Straight Flush in which a 10 is the lowest ranking card in the hand, such as 10S, JS, QS, KS, AS. Again, order does not matter, so QH, 10H, AH, KH, JH is also a Royal Flush. public static int classifyHand(int[][] hand) 1. Seven high 2. Eight high 3. Nine high 4. Ten high 5. Jack high 6. Queen high 7. King high 8. Ace high 9. One Pair 10. Two pair 11. 3 of a kind 12. Straight 13. Flush 14. Full house 15. 4 of a kind 16. Straight flush 17. Royal Flush
Solution
package javapoker;
public category Cardpersonal short rank, suit;
personal static String[] suits = ;
personal static String[] ranks = come back ranks[__rank];
}
Card(short suit, short rank)
public @Override String toString()
come back ranks[rank] + \" of \" + suits[suit];
}
public short getRank() come back rank;
}
public short getSuit() come back suit;
}
}
package javapoker;
import java.util.Random;import java.util.ArrayList;
public category Deck personal ArrayList<Card> cards;
Deck()
}
int size
for (int i=0; i<100; i++)
one );
index_2 = generator.nextInt( cards.size() - one );
worker = cards.get( index_2 );
cards.set( index_2 , cards.get( index_1 ) );
cards.set( index_1, temp );
}
}
public Card drawFromDeck()
come cards.remove( zero );
}
public int getTotalCards()
come back cards.size();
//we may use this methodology once creating
//a complete cards to examine if we wanted a replacement deck
}
}

