Card class lab assignment

From WLCS
Revision as of 11:56, 24 October 2018 by Admin (talk | contribs) (Created page with "== Card class == * Attributes ** String suit ** String name * Constructor ** Card() - default constructor ** Card(String name, String suit) - specific constructor *** Sets the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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"