Write a program to create a class “department” that stores the department name and department id as its private member. Derive a class “employee” from department which is having employee name, age and employee id. Derive another class “accounts” from “department” in protected mode which is having monthly basic salary, DA(15% of basic salary ) and HRA (10% of basic salary ). Display all the details of an employee along with monthly salary (basic salary+ DA +HRA) using necessary member functions.
Comments
Leave a comment