Question: 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,

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) Gross_Salary (annual salary) of Integer type, (iv) Retire_Amt (Annual Retirement Contribution) of double type. All the member data members should be defined as private.

The Employee class 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 Retire_Amt will be initialized as 6% of the Gross Salary.

DisplayEmp:

Output the Name, Employee ID, Gros Salary and Retirement Contributions in separate lines

Output monthly salary of the employee by dividing Gross Salary by 12

Output net Salary of the employee by subtracting retirement contribution from gross salary

GetSalary:

Returns the Gross Salary of the Employee

GetRet:

Returns the Retirement contribution of the Employee

Test your class by creating five different employee objects for a business in the main function (prompt the user to enter the data for creating the employee objects)

Compute and Output Total Gross Salary and Retirement contributions of the all the employees.

Submit: Email your code (Copy and Paste) with the subject line COSC 1437.S70 Lab 2.

`The program should be developed in Visual Studio

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!