Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package csc135;
- public class Card {
- private Suit _suit;
- private Value _value;
- public Card(Suit suit, Value value)
- {
- _suit = suit;
- _value = value;
- }
- public enum Suit
- {
- diamonds, hearts, clubs, spades
- }
- public enum Value
- {
- ace(1), two(2), three(3), four(4), jack(11);
- private int value;
- Value(int val)
- {
- value = val;
- }
- public int getValue()
- {
- return value;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement