Question: Write a Java program that reads 5 integers, each of which is in the range of 1 and 13 representing a simplified poker card with

Write a Java program that reads 5 integers, each of which is in the range of 1 and 13 representing a simplified poker card with no suit. Your program should then print the ranking of the hand with card number(s) besides the ranking. The rankings to determine are Four of a Kind( 4 of the 5 cards of the same rank), Full House( 3 of the 5 cards of the same rank, and 2 cards of another rank), Straight( 5 cards of sequential rank), Three of a Kind(only 3 cards of the same rank), Two Pair(2 cards of the same rank, 2 cards of another rank, and no card of either rank), one pair ( only 2 of 5 cards are of the same rank), high card ( no two cards of the same rank).

Step by Step Solution

3.39 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a Java program that reads 5 integers representing poker cards and determines the ranking of th... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!