Question: Implement the functions in the header file into a .cpp file 10 #include Card.h 11 #include 12 #include 13 14 class Pack { 15 public:

Implement the functions in the header file into a .cpp file

Implement the functions in the header file into a .cpp file 10#include "Card.h" 11 #include 12 #include 13 14 class Pack { 15

10 #include "Card.h" 11 #include 12 #include 13 14 class Pack { 15 public: 16 // EFFECTS: Initializes the Pack to be in the following standard order: 17 11 the cards of the lowest suit arranged from lowest rank to 18 11 highest rank, followed by the cards of the next lowest suit 19 in order from lowest to highest rank, and so on. 20 // NOTE: The standard order is the same as that in pack.in. 21 // NOTE: Do NOT use pack. in in your implementation of this function 22 Pack ( ) ; 23 24 // REQUIRES: pack_input contains a representation of a Pack in the 25 11 format required by the project specification 26 // MODIFIES: pack_input 27 // EFFECTS: Initializes Pack by reading from pack_input. 28 Pack (std: : istream& pack_input) ; 29 30 // REQUIRES: cards remain in the Pack 31 // EFFECTS: Returns the next card in the pack and increments the next index 32 Card deal_one ( ) ; 33 34 // EFFECTS: Resets next index to first card in the Pack 35 void reset(); 36 37 // EFFECTS: Shuffles the Pack and resets the next index. This 38 11 performs an in shuffle seven times. See 39 11 https://en. wikipedia. org/wiki/In_shuffle. 40 void shuffle( ) ; 41 42 // EFFECTS: returns true if there are no more cards left in the pack 43 bool empty() const; 44 45 private: 46 static const int PACK_SIZE = 24; 47 std: : array cards; 48 int next; //index of next card to be dealt 49 50 51 #endif 52#include #include 3 #include #include 5 #include 6 #include 7 #include B #include #include 10 #include 11 #include "Pack.h" 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!