/** * This class represents a single playing card such as the 10 of hearts. * * @author John Paxton * @version January 27, 2005 */ import java.io.BufferedReader; import java.io.IOException; public class Card { Card (String suit, String rank) { this.suit = suit; this.rank = rank; } private void verifySuit() { } private void verifyRank() { } public void readSuit (BufferedReader in) throws IOException { System.out.print("Please enter the suit (clubs, diamonds, hearts, spades) for card > "); suit = in.readLine(); verifySuit(); } public void readRank (BufferedReader in) throws IOException { System.out.print("Please enter the rank (two, three, ..., ace) for card > "); rank = in.readLine(); verifyRank(); } public void setSuit (String suit) { this.suit = suit; } public String getSuit() { return suit; } public void setRank (String rank) { this.rank = rank; } public String getRank() { return rank; } protected String suit; protected String rank; }