title: Creating, shuffling, and dealing a deck of cards using classes in c++
body: <p>Ok, so I'm working on a final project for a computer science class, and I'm just having trouble grasping how to move forward with the assignment.</p>
  
  <p>The criteria provided are:
  Create a standard deck of 52 playing cards and list those cards on the screen. Pause after the unshuffled deck is displayed.</p>
  
  <p>"Shuffle" the deck and list the shuffled deck on the screen.  random_shuffle from  will work on a vector of Cards</p>
  
  <p>Sort (by rank) and evaluate the first 5 cards of the deck as a 'hand'.  Print the unsorted, then the sorted hand.</p>
  
  <p>Then we have to check for things like pairs, three of a kind, full house, straights, flushes, etc. (Which I'm pretty confident I can handle)</p>
  
  <p>The professor gave us this code as an idea for a card class to go off of:</p>
  
  <pre><code>#ifndef CARD_H
  
  #define CARD_H
  
  
  class Card
  {
  public:
      Card();
  
      // set and get the rank, 2=2, 3=3, ... 10=10, 11=J, 12=Q, 13=K, 14=A
      void setRank(int r);
      int getRank();
  
      // set and get the suit, 1=Spades, 2=Hearts, ...
      void setSuit(int r);
      int getSuit();
  
      // for debugging, print the suit and rand as integers
      void print();
  
      // return the rank and suit as a 'nice' looking string
      void toString();
  
  protected:
  private:
      int myRank;
      int mySuit;
  };
  #endif // CARD_H
  </code></pre>
  
  <p>Reading around, it seems like I may need to make deck and hand classes too, but because their goals and restrictions always seemed to be different, I'm just not sure how to really proceed with this. I'm pretty confident that once I figure out which classes I'll need and how to make them play nice together and initiate properly, I'll be able to piece it all together and finish the rest rather easily. </p>
  
  <p>Could anyone point me in the right direction on this?</p>