Question: In java please ! Create a class called Card with three fields called value , face , and suit . The field face and suit
In java please !
Create a class called Card with three fields called value, face, and suit. The field face and suit are strings, where value is an int. This class should contain the methods listed below.constructor methods
default
overloaded
copy
setValue method
Takes in an integer as a parameter.
get methods
getSuit
getFace
getValue
compareTo method
Based on the value of the card.
equals method
Based on the suit and face of the card.
toString method
The string should include all of the fields.
Criteria
| OutcomeDefault Constructor |
| ||
| OutcomeOverloaded Constructor | |||
| OutcomeCopy Constructor | |||
| OutcomesetValue() | |||
| OutcomeGet methods |
| ||
| OutcomecompareTo() | |||
| Outcomeequals() | |||
| OutcometoString() |
| ||
| OutcomeFields |
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
