Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * This class will return info on the input of the user
- *
- *Matt Mueller
- *10/17/06
- */
- public class Card
- {
- private String input;
- public Card(String userInput)
- {
- input = userInput;
- }
- public String getDescription()
- {
- String description;
- //aces
- if (input.equalsIgnoreCase("AD"))
- description = "Ace of Diamonds";
- if (input.equalsIgnoreCase("AH"))
- description = "Ace of Hearts";
- if (input.equalsIgnoreCase("AS"))
- description = "Ace of Spades";
- if (input.equalsIgnoreCase("AC"))
- description = "Ace of Clubs";
- //twos
- if (input.equalsIgnoreCase ("2D"))
- description = "Two of Diamonds;
- if (input.equalsIgnoreCase ("2H"))
- description = "Two of Hearts;
- if (input.equalsIgnoreCase ("2S"))
- description = "Two of Spades;
- if (input.equalsIgnoreCase ("2C"))
- description = "Two of Clubs;
- //threes
- }
- }
Add Comment
Please, Sign In to add comment