Csit Notes

Discuss the chain of constructor and destructor in derived class. Write a program to define a class named Employee with…

  • CSC166
  • Core Course
  • Question 2 · 2081 B.S.

Discuss the chain of constructor and destructor in derived class. Write a program to define a class named Employee with data members name, age and gender. Then create another class named EmployeeSalary inherited from Employee. In this class, the user should give the monthly salary of the employee and calculate the yearly salary after \(15\%\) tax deduction. In the main function, you should get the employee's basic information and salary using inheritance.

Answer

The verified answer for this question is being prepared. Meanwhile, the chapter notes cover this topic, and you can contribute your own solution.