#ifndef _person_h_ #define _person_h_ #include <string.h> #include <iostream.h> class person { public: person() { strcpy(name, ""); } person(const person& p) { strcpy(name, p.name); } virtual person * clone() const = 0; virtual void display(char *) const = 0; void setName(char *); void getName(char *) const; enum { nameLen = 20 }; protected: char name[nameLen+1]; }; class academic { public: academic() { strcpy(dept, ""); } academic(const academic& a) { strcpy(dept, a.dept); } void setDept(char *); void getDept(char *) const; enum { deptLen = 4 }; protected: char dept[deptLen+1]; }; class industry { public: industry() { strcpy(company, ""); } industry(const industry& i) { strcpy(company, i.company); } void setCompany(char *); void getCompany(char *) const; enum { companyLen = 15 }; protected: char company[companyLen+1]; }; class employee : public person { public: employee() { salary = 0; } employee(const employee& e) { salary = e.salary; } void setSalary(int); void getSalary(int&) const; protected: int salary; }; class student : public person, public academic { public: student() { ; } student(const student& s); person * clone() const; void display(char *) const; }; class instructor : public employee, public academic { public: instructor() { ; } instructor(const instructor& i); person * clone() const; void display(char *) const; }; class programmer : public employee, public industry { public: programmer() { ; } programmer(const programmer& p); person * clone() const; void display(char *) const; }; #endif