// Fig. 10.1: commis1.h // CommissionWorker class derived from Employee #ifndef COMMIS1_H #define COMMIS1_H #include #include #include "Employee.h" using namespace std; class CommissionWorker : public Employee { public: CommissionWorker(string first, string last, double salary = 0.0, double commission = 0.0, int quantity= 0 ); void setSalary(double salary); void setCommission(double commission); void setQuantity(int quantity); virtual double earnings() const; virtual void print(ostream &dest) const; private: double salary; // base salary per week double commission; // amount per item sold int quantity; // total items sold for week }; #endif