Page 1 of 1

Write a C++ program to create a class employee with the details empid(string), empname(string), age (int), gender(string

Posted: Fri May 20, 2022 6:18 pm
by answerhappygod
Write a C++ program to create a class employee with the details
empid(string), empname(string), age (int), gender(string) and
function to get the details. Create a class qualification
which derives the class employee.
Class qualification has the details like UG degree (string), PG
degree (String), UG percentage (float)and PG percentage(float) and
function to get the qualification details.
Create a class profession with the details of designation
(string), Basic Pay (float), Allowances (float), deductions (float)
and net pay (float). It has the functions to get the details of the
class profession and also a function to calculate the net pay of
the employee.
Net Pay = (Basic Pay + Allowances) – Deductions
Create a class employee-detail which inherits both qualification
and profession classes which has a function to display all the
details of an employee.
Input Format:
Enter the empid
Enter the empname
Enter the age of the employee
Enter the gender of the employee
Enter the UG degree
Enter the PG degree
Enter the UG percentage
Enter the PG percentage
Enter the designation
Enter the basic pay, allowances, deductions
Output Format:
Empid
Empname
Age
Gender
UG degree
PG degree
UG percentage
PG percentage
Designation
Net pay of the employee