Advertisement
brilliant_moves

Card.java

Nov 19th, 2013
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.35 KB | None | 0 0
  1. public class Card {
  2.  
  3.     public String face;
  4.     public String suit;
  5.  
  6.     public Card() {
  7.         face = "";
  8.         suit = "";
  9.     } // default constructor
  10.  
  11.     public Card(String face, String suit) {
  12.         this.face = face;
  13.         this.suit = suit;
  14.     } // overloaded constructor
  15.  
  16.     public String toString() {
  17.         return (face + " of "+suit);
  18.     } // end toString()
  19. } // end class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement