A C++ program using Hierarchical inheritance
Preparing for BCA exams C++ programming language examination? Facing doubts in writing programs for hierarchical inheritance? Check out this Ask Expert page and get the solution for the program.
This question is asked for 10 marks and hence requires some explanation along with the program code. Please let me know the solution.
Q) Write a program in C++, using the inheritance feature to define a base class "Employee" and derive "Manager","Engineer", "Technical Officer" and a"Clerk" as derived classes. Select meaningful data members and member functions for the respective classes. Write a member functions to display the name of the person, designation, department s/he is working with. [ 10 Marks ]