Question: Create Rank and Suit enum types and use them below. Create an immutable Card class However, override and overload the . equals methods with sigr

Create Rank and Suit enum types and use them below. Create an immutable Card class However, override and overload the . equals methods with sigr public Rank getRank(); public Suit getSuit(); public int getCribCount(); public String toString(); public static Card getCard(Rank r, Suit s) ; public static Card getCard(int i); The tostring () method should return a string like "9S" for the nine of spades. Tens can be represented either by "T" ('\u0054') or by " 0 (' \u2469 '). (Instead of C D H S for clubs, diaacceptable. Your Card class needs constructors, and internal private state variables. The static getCard mehtods should just call these constructors, as in public static Card getCard(Rank r, Suit s) \{ return new Card(r,s) ; \} public static Card getCard(int i) \{ return new Card(i); } The Card(int i ) should take a number 0i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
