/*****************************************************/
/* declaration of the base class Home
*/
/*****************************************************/
class Home
{
protected:
char* homePhone;
char* homeAddress;
public:
Home(int hp, char* ha);
~Home();
void print();
};
/*****************************************************/
/* declaration of the base class Work
*/
/*****************************************************/
class Work
{
protected:
char* workPhone;
char* workFax;
char* workAddress;
public:
Work(int wp, int wf, char* wa);
~Work();
void print();
};
/******************************************************/
/* declaration of the derived class HomeOffice
*/
/******************************************************/
class HomeOffice : public Home, public Work
{
public:
HomeOffice(const char* const hp, const
char* const ha,
const char* const wp, const char* const wf,
const char* const wa);
void print();
};
/******************************************************/
/* implementation of the constructor of derived class HomeOffice
*/
/******************************************************/
HomeOffice::HomeOffice(const char* const hp, const char* const
ha,
const char* const wp, const char* const wf,
const char* const wa)
: Home(hp, ha), Office(wp,
wf, wa)
{}