производном классе
class Employee {
public:
Worker(string _name,
string _surname);// ...
virtual void print() const;
private:
string name, surname;
Date hire_date, fire_date;
};
class Programmer: public Employee
{
public:
Programmer(string _name,
string _surname,
string _team);
virtual void print() const;
private:
string team;
};