Advertisement
teleias

Card

Oct 13th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. package csc135;
  2.  
  3. public class Card {
  4.     private Suit _suit;
  5.     private Value _value;
  6.     public Card(Suit suit, Value value)
  7.     {
  8.         _suit = suit;
  9.         _value = value;
  10.     }
  11.     public enum Suit
  12.     {
  13.         diamonds, hearts, clubs, spades
  14.     }
  15.     public enum Value
  16.     {
  17.         ace(1), two(2), three(3), four(4), jack(11);
  18.         private int value;
  19.         Value(int val)
  20.         {
  21.             value = val;
  22.         }
  23.         public int getValue()
  24.         {
  25.             return value;
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement