I\'m making a blackjack program in Java, and I was starting to write the class declaration for an object Card. Will this be sufficient, or are there some methods I should ha
You might want to make subclasses for different games. PokerCard and SolitareCard can be Comparable; in one, Ace is greater than King; in the other, Ace is less than King.
For BlackjackCard, comparison is irrelevant. You might consider having an intValue(), where intValue() of K or Q or J is 10, but that won't work easily for BlackjackCard because an Ace can be one or eleven. So this is a good exercise in designing the model to match the real world: here is a problem where the integer value of the card is not completely intrinsic to the card but is dependent on the card's context.