Menu

[solved]-Need Help Creating Card Class Java Specifications 1 Card Object Card Object Model Single P Q39050696

Need help creating a card class in java

Specifications:

1. Card Object. The card object will model a single playingcard. It will consist of the following

a. Instance Variables:

  i. Card Name (Ace, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,Jack, Queen, King)

ii. Card Suit (Clubs, Diamonds, Hearts, Spades)

b. Methods:

i. Constructor – Builds the object. Passed Name and Suite asStrings

ii. Setters – Usual Setters

iii. Getters – Usual Getters

iv. toString – Returns Card Name and Suite

v. equals – Compares Card Name and Suite

vi. compareTo – Compares Name. Suit does not matter. Returns -1if this is higher, 0 if equal, 1 if other object is higher.

vii. displayCard. (Optional and a challenge. Draws a nice prettyascii view of the card using Unicode Characters.

Expert Answer


Answer to Need help creating a card class in java Specifications: 1. Card Object. The card object will model a single playing card… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *