#ifndef CARD_H #define CARD_H #include <string> using namespace std; class Card
ID: 3529649 • Letter: #
Question
#ifndef CARD_H
#define CARD_H
#include <string>
using namespace std;
class Card
{
public:
static const int totalFaces = 13; // total number of faces
static const int totalSuits = 4; // total number of suits
Card( int cardFace, int cardSuit ); // initialize face and suit
string toString() const; // returns a string representation of a Card
// get the card's face
int getFace() const
{
return face;
} // end function getFace
// get the card's suit
int getSuit() const
{
return suit;
} // end function getSuit
private:
int face;
int suit;
static const string faceNames[ totalFaces ];
static const string suitNames[ totalSuits ];
}; // end class Card
#endif
Explanation / Answer
It says that you have no default constructor for Card. How do you want it to act when no face and suit is given?
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.