Write a program to read the following hierarchy. Employee is derived into PermanentEmployees and DailyEmployees. PermanentEmployees are derived into DepartmentalEmployees and CompanyEmployees. CompanyEmployees are derived into RegionalManagers and AreaManagers. DepartmentalEmployees are derived into Sales, Production, and HumanResource employees. Defi ne a single array for storing all employee objects. Defi ne a function Salary, which displays the salary (do not calculate salary; just display any value) of permanent employees alone. Use dynamic_cast to solve the problem.  ( Hint: we cannot use virtual functions defi ned in the Employee class here as DailyEmployees do not have salary functions defi ned. We have to defi ne salary as a virtual function in the class PermanentEmployees. We have to use Employee pointer to access the objects. Whenever it is valid to cast from Employee to PermanentEmployees, the object belongs to any of the descendants of PermanentEmployees class. dynamic_cast helps us to fi nd this.)

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!