Lab 2 - Deck of PlayingCards
Create a class to (somewhat) mimic a deck of cards.
This will be our first iteration with developing a deck of cards. We will have at least one more lab in which we implement a deck of cards.
This will be a somewhat static deck of cards. When the user asks for a new card, she may get a card that she has already seen. Basically, all 52 cards will stay in the deck and when a new card is requested a rand() % 52 will pick the new card.
The name of the class should be CardDeck01, the .h file should be CardDeck01.h, and the source file should be CardDeck01.cpp. You will be compiling with a driver that I provide, CardDeck01Driver.cpp.
Interface
The public member functions are as follows:
CardDeck01()
Constructor which creates the deck and sets the current card at a random location.
void newCard()
Chooses a random card within the deck to become the current card.
char getCrntSuit() 
Returns the suit of the current card. Should call a member function of the PlayingCard class.
char getCrntValue()
Returns the value of the current card. Should call a member function of the PlayingCard class.
string GetCrntCardCode()
Returns a string containing the value and suit of the current card. Should call a member function of PlayingCard class.
string GetAllCardCodes()
Returns a string containing the codes for all the cards in the deck. It should do this by rows of 13. Each of those rows should probably be one suit. This should make repeated use of a member function of PlayingCard class.
Implementation
While there are many different ways to implement this class, you are required to do it in the way outlined here.
You will use an array of 52 PlayingCard objects.
You will use an integer to keep track of the current card.
You will use rand() % 52 to determine a new value of the current card.
You will not use a random seed. This is required so that your output will more closely resemble the output from my version.
You will use my driver and will not alter it.
To Turn In
Zip your project folder, including CardDeck01.h, CardDeck01.cpp, CardDeck01Driver.cpp, and CardDeck01.cbp and upload it. Also, upload the output from a run of the program.