Hello! Such situation. The program for calculating employee salaries.
Employees 3 species.
There is a base class worker , from it 3 successors turn out: from it, employee , manager , sales . Information about employees is stored in a database.
Here we pull out information about some employee, in the column type of activity - employee . How to create object of class employee ? Those. for manager , an object of class manager , etc.