Class exercise CS106A (Stanford university)
I am doing this exercise of chapter 6 of the book "Art and science of Java" by Eric Robert.I do not understand what this question is asking me to do.If I can understand the question I guess i can handle answer.Here's the question:
Implement a new class called Card that includes the following entries:
• Named constants for the four suits (CLUBS, DIAMONDS, HEARTS, SPADES) and the
four ranks that are traditionally represented in words (ACE, JACK, QUEEN, KING).
The values of the rank constants should be 1, 11, 12, and 13, respectively.
• A constructor that takes a rank and a suit and returns a Card with those values.
• Accessor methods getRank and getSuit to retrieve the rank and suit components
of a card.
• An implementation of the toString method that returns the complete name of the
card as in exercise 1. Remember that you can use the + operator to connect the
different parts of the string together, as shown in the toString implementation
for the Rational class in Figure 6-9.