import java.awt.*; public class Card { // instance variables - replace the example below with your own private int suit; // 0=clubs, 1=diamond, 2=heart, 3=spades private int value; // 2 - 14 (11=jack, 12=queen, 13=king, 14=ace) private int rank; // 0 .. 51 private Image faceImg; // image for the face of the card private Image backImg; // image for the back of the card /** * Constructor for objects of class Card */ public Card(int r) { // initialise instance variables this.rank = r; // passed the rank (between 0..51) suit = r/13; // this gives a value between 0..3 value = 2 + r % 13; // gives value of card between 2..14 } public Card() { } public String toString() { String s = "Club"; String v = "" + value; // convert int to String using empty String if (suit == 0) s = "Club"; if (suit == 1) s = "Diamond"; if (suit == 2) s = "Heart"; if (suit == 3) s = "Spade"; if (value == 11) v = "Jack"; if (value == 12) v = "Queen"; if (value == 13) v = "King"; if (value == 14) v = "Ace"; return v + " of " + s; } public void setFaceImage(Image img) { // fill in this line and the ones below } public void setBackImage(Image img) { } public int getRank() { } public int getValue() { } public int getSuit() { } } // card