Difference between revisions of "Card class lab assignment"

From WLCS
(Created page with "== Card class == * Attributes ** String suit ** String name * Constructor ** Card() - default constructor ** Card(String name, String suit) - specific constructor *** Sets the...")
(No difference)

Revision as of 11:56, 24 October 2018

Card class

  • Attributes
    • String suit
    • String name
  • Constructor
    • Card() - default constructor
    • Card(String name, String suit) - specific constructor
      • Sets the internal attributes to the same as the parameters
  • Methods
    • String getSuit()
    • void setSuit()
    • String getName()
    • void setName()
    • int getValue()
      • returns the numerical value of the card
    • String toString()
      • returns the String representation of the card in the form "NAME of SUIT"