each picture attached is each its own class in c can someone tell me how i can i edi 5153112
Each picture attached is each its own class. In c++, can someone tell me how I can i edit this existing code so that it opens a file and reads the input from the file instead of from the keyboard?
11 using namespace std; 12e int main()” aria-describedby=”j7k”>
11 #include // for toupper 12e cl” aria-describedby=”j7l”>
11 #include 12 using namespace std; 13 14e class Card { 15″ aria-describedby=”j7n”>
if this helps, these were the original instructions
6 // Description : Program 4, Chapter 13 8 9 #include “Hand.h” 10 #include 11 using namespace std; 12e int main() //this will allow main to check the hand and card classes 13 { 14 Hand hands InDeck; hands InDeck.fillHand(); hands InDeck.print(); return 0; 19 Probleris Tasks Console Properties 6 */ 7 #include “Hand.h” 8 #define HAND H 9 #include “Card.h” 10 #include 11 #include // for toupper 12e class Hand { 13 private: vector typeOfCard; 15 public: Hand() {} void print(); void fillHand(); BEE Problems as Consoles Pc.cpp Handh 8 #include “Hand.h” Hand.cpp Cardh Card.cpp 100 void Card: :print() { 11 cout>suitcode; while(toupper(suitcode) 'S' && toupper(suitcode) != 'R' && toupper(suitcode) cout>suitcode; – D' && toupper(suit cout<<“Enter spot code(1-13) : ” cin>>spotcode; while(spotcode 13) { cout>spotcode; Card typeOfCard(toupper(suitcode), spotcode); typeOfCard.push_back(typeOfCard); 8 #ifndef CARD_H 9 #define CARD H 10 #include 11 #include 12 using namespace std; 13 14e class Card { 15 private: char suitcode; int spotcode; public: Card(char suitcode, int spotcode) { this->suitcode = suitcode; this->spotcode – spotcode; void print(); 24 ); 25 endif 26 Properties 13. Problems Tasks Console No consoles to display at this time. Phase 1. Write a Card class and a main function. Data members of the Card class should be: 1. a suit-code (a letter, SHDC) 2. a spot-code: a number (1..13, where 1 is the Ace, 11 is the Jack, 12 is the Queen, and 13 is the King.) The function members should be: 1. A constructor. Parameters to the constructor are the suit-code and the spot-code mentioned above. The constructor will initialize a card using these values. 2. A print function (no parameters) that prints the two data fields neatly in columns. We will add to this later. B. Make a new class called Hand in a new file. The only data member is a vector of Cards. Function members are b1. A constructor b2. A print function b3. A function called fill Hand that inputs cards from the keyboard. When you test it, enter at least 4 cards.