Question: do it in c++ and correct answer will get a like! Task 1: MULTIPLE INHERITANCE Provide the C++ implementation of the following. Person Employee Teacher
do it in c++ and correct answer will get a like!
Task 1: MULTIPLE INHERITANCE Provide the C++ implementation of the following. Person Employee Teacher The Person class has name and age as its attributes. It has an overloaded constructor to initialize the values and appropriate getter and setter methods. The Employee class has name of the employer and wage as its attributes with an overloaded constructor and appropriate getter and setter methods. You will do it like this in Teacher class: class Teacher: public Person, public Employee Note that teacher is inheriting from both Person and Employee. In multiple inheritance, there are more than 1 parents. In this example, there are two parents. There could have been more than 2 parent classes too. Teacher has an attribute of Pay Scale of type integer. It has overloaded constructor, appropriate accessor (getter), mutator (setter) methods and a display function to print the Name, Age, Name of Employer, Wage and Pay Scale of Teacher
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
