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 300 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 200 Civil Carpentering 300 Tlectrical 3300 Electrician 300 Compute: 2000 Designer 350 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 one("Ali", "Omar", "Electrician"); engineer two("Ali", "Omar", "Electrician", "Electrical"); person *ptrPersonOne,*ptr 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!