Your Employee class also has a readData function and a writeData function. These will have to be modified slightly so that the functions only read and write the data common to both hourly and salaried employees. Then write a readData and WriteData method in each derived class. The derived class functions override the functions in the base class and should only read and write the data uniquely defined in their respective class, and call the base class readData and writeData functions to take care of the data that belongs to the base Employee class. |
|
|
|
|
|
|
-858993460 40 12 -858993460 1200 -858993460 40 10 -858993460 1000 |