Guest User

Untitled

a guest
Apr 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1.  
  2. public class Card
  3. {
  4. private int value;
  5. private String color;
  6.  
  7. public Card (int value, String color)
  8. {
  9.     this.value=value;
  10.     this.color=color;
  11. }
  12.  
  13. public int getValue()
  14. {
  15.     return this.value;
  16. }
  17.  
  18. public String getColor()
  19. {
  20.     return this.color;
  21. }
  22.  
  23. public String toString()
  24. {
  25.     return this.color+" "+this.value;
  26. }
  27. }
Add Comment
Please, Sign In to add comment