#ifndef EMPLOYEE_H #define EMPLOYEE_H /**************************************************************************** ** COPYRIGHT (C): 1997 Cay S. Horstmann. All Rights Reserved. ** PROJECT: Practical OO Development with C++ and Java ** FILE: employee.h ** PURPOSE: employee class for chapter 3 ** VERSION 1.0 ** PROGRAMMERS: Cay Horstmann (CSH) ** RELEASE DATE: 3-15-97 (CSH) ** UPDATE HISTORY: ****************************************************************************/ #line 14 "employee.cpp" #ifndef DATE_H #include "date.h" #endif #line 17 "employee.cpp" class Employee { public: Employee(); Employee(string); Employee(string, int id); Employee(string n, int hd, int hm, int hy); void set_id(int id); void set_salary(double s); void raise_salary(double p); virtual void print() const; virtual void print(ostream& os) const; int id() const; double hourly_wage() const; virtual double weekly_pay(double hours) const; virtual ~Employee() {} private: string _name; double _wage; int _id; Date _hiredate; }; #line 45 "employee.cpp" class Manager : public Employee /* PURPOSE: A manager supervising employees */ { public: Manager(); Manager(string s); void add(Employee* e); virtual void print(ostream&) const; virtual double weekly_pay(double hours) const; private: #ifndef PRACTICALOO_MUST_USE_ALLOCATOR vector _superv; #else vector > _superv; #endif // ID numbers of supervised employees }; #endif