Question: 1. Implement a Card class that represents a single playing card from a standard 52 card deck. Each card has a rank and a suit.
1. Implement a Card class that represents a single playing card from a standard 52 card deck. Each card has a rank and a suit. All ranks and suits are public constants in the class (Card.SPADES, Card.ACE, etc). A Card object is created with a rank and suit and it cannot be modified after creation. For this design, two cards are equal if they contain the same rank. Full javadocs documentation required (@param, @return, @Override) Write a driver class that has a main method that completely demonstrates the functionality of this class. Test all methods Card +SPADES: int +CLUBS int +HEARTS: int +DIAMONDS: int +ACE:int +JACK: int + QUEEN : int +KING int - rank: int - suit : int +Card (suit:int, rank:int) +getRank int +tostring String tequals (otherCard:Card) boolean
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
