Given this code
class Address { private: char * streetName; int houseNumber; public: Address(char* strName, int houseNumber) {....} } class Person { protected: char *name, * phoneNumber; Address addr; public: Person(char* n, char* pN, char* stN, char* hsN): addr(stN,hsN) { //...... assign variable for person } }; class Officer: public Person { private: double salary; public: // How to write the constructor?? Officer(char* _name, char*_phoneNumber, char* _streetName, int _streetNumber, double _salary): .... ???? } How to write the constructor for the derived class Officer which has five input variables, in which _streetName and _streetNumber will be feed to the member object addr contained in the base class Person?
std::stringinstead ofchar*.