Create another class employee2 from class EMPLOYEE given below. This new class
should add a type double data item called compensation, and also a string type called time to
indicate whether the employee is paid hourly, weekly, or monthly, with member functions input
and display. For simplicity you can change the manager, scientist, and laborer classes so they are
derived from employee2 and employee classes.
#include<iostream>
using namespace std;
class EMPLOYEE
{
protected:
string name;
unsigned long number;
public:
void getdata();
void putdata();
};
Comments
Leave a comment