A deck of cards contains 52 cards. Each card has a suit (Clubs, Diamonds, Hearts, or Spades) and a
value (2, 3, ..., 9, 10, Jack, Queen, King, or Ace).
In the game of bridge a hand consists of 13 or fewer cards from the deck. The values of the cards are ordered as shown above, with Ace having the highest value.
Suppose that hand is given as a String giving the cards in the hand. Each card
is represented by a suit character C, D, H, or S followed by a value character 2, 3,
..., 9, T, J, Q, K, or A. There are no spaces separating adjacent cards in hand.
Create a class BridgeSort that contains a method sortedHand that is given a
String hand and that returns the String that represents the hand in sorted order. The
proper order is to list all the cards that are Clubs, then all the Diamonds,
then all the Hearts, and finally all the Spades, with the cards within each suit listed in order of ascending value.
|