Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

(1 point) Calculate 3 sin x cos x dx.

Answered: 1 week ago