Question: I need help, to turning in the next code in : Card.h, Card.cpp, DeckOfCards.h, DeckOfCards.cpp, PokerHand.h, PokerHand.cpp and pokerdriver.cpp that has your main. can you
I need help, to turning in the next code in : Card.h, Card.cpp, DeckOfCards.h, DeckOfCards.cpp, PokerHand.h, PokerHand.cpp and pokerdriver.cpp that has your main. can you guys can help me to separate each part .






![faces[14]; //static array suits static string suits[4]; //access specifier public: //constructor Card(int](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4fc3b9fe73_38766f4fc3b4c8fc.jpg)

code:
//include the required header files
#include
#include
#include
//use the namespace standard
using namespace std;
//define a class named card
class Card
{
//access specifier
private:
//private data types
int face, suit;
//static array faces
static string faces[14];
//static array suits
static string suits[4];
//access specifier
public:
//constructor
Card(int face, int suit);
//to string operation to represent faces and strings
string toString();
};
//define the values for faces[]
string Card::faces[] = {"", "Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"};
//define the values for suits[]
string Card::suits[] = {"Hearts", "Spdaes", "Clubs", "Diamonds"};
//constructor class
Card::Card(int face, int suit)
{
//use this operator
this->face = face;
//use this operator
this->suit = suit;
}
//to return string in the form of face of suit
string Card::toString()
{
//set the delimiter
string mid_wrd = " of ";
//return the string value
return faces[face] + mid_wrd + suits[suit];
}
//define a class named deckofcards
class DeckOfCards
{
//access specifier
private:
//declare a vector
vector
//variable to represent the next card to deal
int current_Card;
//access specifier
public:
//default constructor
DeckOfCards();
//declare the function shuffle
void function_shufle();
//declare the function dealCard()
Card dealCard();
//declare the function moreCards()
bool moreCards();
};
//define the function
DeckOfCards::DeckOfCards()
{
//declare the varibale
current_Card = 0;
//loop through 52 cards
for(int i = 0; i
{
//initialises the card in the desk
cards.push_back(Card((i % 13) + 1, i / 13));
}
}
//function definition
void DeckOfCards::function_shufle()
{
//declare the variable
int r_i;
//loop through 52 cards
for(int i = 0; i
{
//select the card randomnly
r_i = rand() % 52;
Card temp = cards[i];
cards[i] = cards[r_i];
cards[r_i] = temp;
}
}
//function definition
Card DeckOfCards::dealCard()
{
//return the next card object from deck
return cards[current_Card++];
}
//function definition
bool DeckOfCards::moreCards()
{
//return whether there are more cards to deal with
return current_Card
}
//main function()
int main()
{
//create an object
DeckOfCards obj;
//call the function
obj.function_shufle();
//print the cards
while(obj.moreCards()){
cout
}
return 0;
}
//include the required header files #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
