ven the following class definition: class employee { public: employee(); employee(string, int, double); employee(int, double); employee(string); void setData(string, int, double); void print() const; void updatePay(double); int getNumOfServiceYears() const;
Given the following class definition:
class employee
{
public:
employee();
employee(string, int, double);
employee(int, double);
employee(string);
void setData(string, int, double);
void print() const;
void updatePay(double);
int getNumOfServiceYears() const;
double getPay() const;
private:
string name;
int numOfServiceYears;
double pay;
};
Create a class parttime derived from the above class that includes private members payRate and hoursWorked of type double along with a constructor and the definition of a print function that prints out all information from the base and derived class. Provide a test program that would demonstrate the working parttime class.
Note: You can assume all code is stored in a single file.

Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images









