package com.example.enumeration;

import static com.example.enumeration.Suit.*;

class Card {
	private Suit suit;
	private int rank;

	public Card(Suit suit, int rank) {
		this.suit = suit;
		this.rank = rank;
	}

	public Suit getSuit() {
		return suit;
	}

	public void setSuit(Suit suit) {
		this.suit = suit;
	}

	public int getRank() {
		return rank;
	}

	public void setRank(int rank) {
		this.rank = rank;
	}
}

public class TestCard {

	public static void main(String[] args) {
		// import static allows you to access the static member without prefix
		Card card1 = new Card(CLUB, 10);
		System.out.println("card1 is " + card1.getRank() + " of " + card1.getSuit().getName());
		
		Card card2 = new Card(DIAMOND, 5);
		System.out.println("card2 is " + card2.getRank() + " of " + card2.getSuit().getName());
	}

}
