Two Header Files Describe Interface Base Class Person Derived Class Empolyee Respectively Q28917453

The two header files below describe the interface of the base class Person and its derived class Empolyee, respectively. Please implement all the functions declared in these two header files in their corresponding cpp files 1. Header file: Person.h #lfnaef Person h #de fine Pers n h #include #include #include <iostream> <string> <new> using namespace std; class Pers n { public: //This interface is by no means complete. Please feel free to // add more functions if needed. The test cases however will only // test the following functions. virtual Person Person O: 1/0->SSN, na->name, personal@->personalEmail, 10->cntPlaces, allocate space to placesvVisited and initializes each place to unknown Person& operator- (const Person& rhs Person ( const Person &clone string getPlace (int i) const; //return the i-th place in the placesVisited array if i is valid; otherwise return out-of-boundary . virtual string getEmail() const: I/return personalEmail virtual void setEmail string new_email); 1/new_email-->personalEmail virtual string getTypeofobj ) consti //return Person private: int SSN string name; string personalEmail; string *placesvisited; int cntPlacesi //companion variable of the above pointer #endif /* Person

The two header files below describe the interface of the base class Person and its derived class Empolyee, respectively. Please implement all the functions declared in these two header files in their corresponding cpp files 1. Header file: Person.h #lfnaef Person h #de fine Pers n h #include #include #include using namespace std; class Pers n { public: //This interface is by no means complete. Please feel free to // add more functions if needed. The test cases however will only // test the following functions. virtual Person Person O: 1/0->SSN, “na”->name, “personal@”->personalEmail, 10->cntPlaces, allocate space to placesvVisited and initializes each place to “unknown” Person& operator- (const Person& rhs Person ( const Person &clone string getPlace (int i) const; //return the i-th place in the placesVisited array if i is valid; otherwise return “out-of-boundary” . virtual string getEmail() const: I/return personalEmail virtual void setEmail string new_email); 1/new_email–>personalEmail virtual string getTypeofobj ) consti //return “Person” private: int SSN string name; string personalEmail; string *placesvisited; int cntPlacesi //companion variable of the above pointer #endif /* Person Show transcribed image text The two header files below describe the interface of the base class Person and its derived class Empolyee, respectively. Please implement all the functions declared in these two header files in their corresponding cpp files 1. Header file: Person.h #lfnaef Person h #de fine Pers n h #include #include #include using namespace std; class Pers n { public: //This interface is by no means complete. Please feel free to // add more functions if needed. The test cases however will only // test the following functions. virtual Person Person O: 1/0->SSN, “na”->name, “personal@”->personalEmail, 10->cntPlaces, allocate space to placesvVisited and initializes each place to “unknown” Person& operator- (const Person& rhs Person ( const Person &clone string getPlace (int i) const; //return the i-th place in the placesVisited array if i is valid; otherwise return “out-of-boundary” . virtual string getEmail() const: I/return personalEmail virtual void setEmail string new_email); 1/new_email–>personalEmail virtual string getTypeofobj ) consti //return “Person” private: int SSN string name; string personalEmail; string *placesvisited; int cntPlacesi //companion variable of the above pointer #endif /* Person

“We Offer Paper Writing Services on all Disciplines, Make an Order Now and we will be Glad to Help”

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.