o Simulate a deck of playing cards o Shuffle the deck o Deal (5) cards into the hand o Turn over the first card o The user must guess whether the next card is higher or lower o Turn over the next card o If the user guesses correctly, the game continues o If the user guesses incorrectly, the game ends o If the user guesses correctly (4) times, the game is over and the user wins
Card Class o Face o Suit o Rank is based upon the Face o Implements the Comparable interface o Methods Constructor public String getFace() public String getSuit() public int getRank() public int compare To(Object other)
Hand Class o Represented as an array or as an ArrayList o Methods Constructor public int getSize() public void addCard(Card c) public Card getCard(int i) private void changeCard(int pos, Card c) public void sort() private int findLowestIndex(int startindex) public void printHand()
CardDeck Class o Represented as a 2-dimensional array of Card objects o Methods Constructor public void shuffle() public Card deal() public void printDeck()
The User Clicks Higher
The User Clicks Lower
The User Clicks Higher
The User is Wrong! Game Over
o Blackjack o War o Games that use different card decks Extend the Card Class o Games where Card ranks are different Extend the Card Class