Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a class (named Employee). Each employee will have four data members: (i) Name of the employee (string type), (ii) Emp.D (Employee ID- integer type),

image text in transcribed

Create a class (named Employee). Each employee will have four data members: (i) Name of the employee (string type), (ii) Emp.D (Employee ID- integer type), (iii) COSSA Salax (annual salary) of the employee (integer type) (iv) Savings (savings by the employee - 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 Empalb Integer to initialize Salary The Savings will be computed as 10% of the Gross Salary amount. DisplayEmp; Display the Name, Employee ID, Gros Salary and Savings in separate lines Display monthly salary by dividing Gross Salary by 12 Display net Salary by subtracting savings contribution from gross salary GetSalary Returns the Gross Salary of the Employee ShowSavings: Returns the savings contribution of the Employee - Test your class (invoke the public member functions of the class in the main function and display the results with appropriate messages) by creating five different employee objects for a small business in the main function (prompt the user to enter the data for creating the employee objects) Submit: Email your code (Copy and Paste) with the subject line "CosC 1437.S70 - Lab 1'" The program should be developed in Visual Studio

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

Students also viewed these Databases questions

Question

a. Describe the encounter. What made it intercultural?

Answered: 1 week ago