class PlayingCardExample { public static void main(String[] Args) { String msg; PlayingCard aceOfSpades = new PlayingCard(PlayingCard.Value.ACE, PlayingCard.Suit.SPADE); PlayingCard queenOfHearts = new PlayingCard(PlayingCard.Value.QUEEN, PlayingCard.Suit.HEART); PlayingCard sevenOfDiamonds = new PlayingCard(PlayingCard.Value.SEVEN, PlayingCard.Suit.DIAMOND); PlayingCard twoOfClubs = new PlayingCard(PlayingCard.Value.TWO, PlayingCard.Suit.CLUB); System.out.println(aceOfSpades); System.out.println(queenOfHearts); System.out.println(sevenOfDiamonds); System.out.println(twoOfClubs); if( aceOfSpades.getValue().lessThan(queenOfHearts.getValue()) ) { msg = "Ace is \"less than\" Queen"; System.out.println( msg ); } if( !aceOfSpades.getValue().greaterThanEq(queenOfHearts.getValue()) ) { msg = "Ace is NOT \"greater than or equal to\" Queen"; System.out.println(); } if( aceOfSpades.getValue().lessThan(twoOfClubs.getValue()) ) { msg = "Ace is \"less than\" Two"; System.out.println( msg ); } if( !aceOfSpades.getValue().greaterThanEq(twoOfClubs.getValue()) ) { msg = "Ace is NOT \"greater than or equal to\" Two"; System.out.println( msg ); } if( !sevenOfDiamonds.getValue().lessThanEq(twoOfClubs.getValue()) ) { msg = "Seven is NOT \"less than or equal to\" Two"; System.out.println( msg ); } if( !sevenOfDiamonds.getValue().greaterThan(twoOfClubs.getValue()) ) { msg = "Seven is \"greater than\" Two"; System.out.println( msg ); } msg = "The numeric value of the Ace is " + aceOfSpades.getValue().toInt(); System.out.println( msg ); msg = "The numeric value of the Two is " + twoOfClubs.getValue().toInt(); System.out.println( msg ); msg = "The numeric value of the Seven is " + sevenOfDiamonds.getValue().toInt(); System.out.println( msg ); msg = "The numeric value of the Queen is " + queenOfHearts.getValue().toInt(); System.out.println( msg ); } }