Question: Define the following three classes which represent three different employees Class Names Publicly Data Members Member Function Person hase first stond Worker derived Personalary, training
Define the following three classes which represent three different employees Class Names Publicly Data Members Member Function Person hase first stond Worker derived Personalary, training Jan Salary Engineerived Worker print.indalory.pl Training Degree Sel a firstName, lastName, training, and degree are variables of type string. Salary is a variable of type integer. The salary is incremented according to the following table Diplome Salary Salary Civil Carpentering Tlectrical Electrician Compute: Designer The function prins only prints the salary. Additional member functions can be added as needed Declare a member function prin of the base class Person as a virtual function. Make the base class Person an abstract base class by declaring a member function findSalary a pure virtual function. The following driver produces the given sample of output: int main worker oneAli "Omar", "Electrician"; engineer twoAli "Omar", "Electrician", "Electrical"; person ptrPersonOneptr Person Two; ptrPersonOne &one; ptrPerson Two &two: ptrPersonOne findSalaryo: ptrPersonTwo findSalary: ptrPersonOne print: cout
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
