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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply