Object-Oriented Programming · Square · Medium
A player's hand consists of five cards. Every card has a suit and a rank, where the rank is a number between 1 and 10 inclusive. Design a class to represent a card, and then compute a score for the hand. The score is made up of three kinds of contributions: whether the hand is a flush, the pairs of cards that share the same rank, and the groups of cards whose ranks sum to 15.