Reference no: EM13334075
Use object oriented design to create a program to shuffle and deal a deck of cards. Deal two, five card hands.
Your program should then determine which hand is the winning hand based on the following:
Ranks of the hands from top to bottom
royal flush - highest 5 denominations in the same suit (all diamonds A,K,Q,J,10)
straight flush - 5 cards in the same suit and in order of denomination ( all spades 4,5,6,7,8,9)
4 of a kind - four cards of the same denomination (8,8,8,8,) A
full house - three cards of one denomination and two of the other (A,A,3,3,3)
flush - five cards in the same suit, but not in order (all Aces 7,9,J,A,Q)
straight - five cards in sequence (7,8,9,J,Q,)
three of a kind - three cards of the same value (4,4,4) Q K
two pair - two cards of one denomination and two of another denomination (A,A,5,5) 7
one pair - two cards of the same suit (K, K) 5,A,3
hi card - person with the highest card wins (Q) 7,8,9,J
For simplicity there is no betting or trading of cards.