CS206 Data Structures
Programing Assignment#2
Due on Tuesday, February 13, 2007
Problem: Do Exercise 9 from Chapter 1 of Miller & Ranum.
Create a class called, Card that models a single playing card. It has a suit: Clubs, Diamonds, Hearts, Spades; and a rank: 1-13 (or Ace, 1, 2, ..., 10, Jack, Queen, King). The following operations should be defined for cards:
Then, define another class called, CardDeck with the following operations:
Write a program that uses these classes to create a deck, print it out, shuffle the deck, print it out, and then deal 5 cards each to two players: print out each player's hand, and the remainder of the deck.
Hand in a printout of your program along with several sample runs of your program.