Question: C++ Program Using Visual Studio Program Requirements: Create a class (named Employee). Each employee will have four data members: (i) Name of string type, (ii)

C++ Program Using Visual Studio

Program Requirements:

Create a class (named Employee). Each employee will have four data members: (i) Name of string type, (ii) Emp_ID (Employee ID) of integer type, (iii) Salary (annual salary) of Integer type, (iv) Retirement_cont (Annual Retirement Contribution) of double type. The member data members should be private.

It will have the following public member functions:

Constructor with following parameters: A pointer to a string to initialize the Name of the employee Integer to initialize the Emp_ID Integer to initialize Salary

The Retirement_cont will be initialized as 6% of the Salary

DisplayEmp: Output the Name, Employee ID, Salary and Retirement Contributions in separate lines Output monthly gross salary of the employee by dividing Salary by 12 Output net Salary of the employee by subtracting retirement contribution from gross salary

GetSalary: Returns the Salary of the Employee

GetRet: Returns the Retirement contribution of the Employee

Test your class by creating five different employee objects for a small business in the main function.

Output Total Salary and Retirement contributions of the Employees.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!