Question: Complete using c++ Write a class named Employee which has the following private member variables: -name (a string) -idNumber (an int) -department (a string) -position

Complete using c++

Write a class named Employee which has the following private member variables:

-name (a string)

-idNumber (an int)

-department (a string)

-position (a string)

The Employee class should have the following public member functions:

-a default constructor

-a constructor which accepts the employee name and ID number as arguments and assigns them to the appropriate member variables

-a constructor which accepts the employee name, ID number, department, and position as arguments and assigns them to the appropriate member variables

Also write the appropriate accessor (getter) and mutator (setter) functions for each of the member variables.

The employee ID number will be entered by the user in a member function named Enter_ID and returned via its return type. Enter_ID will call "private" member function Validate to validate the ID, which will be returned to Enter_ID via reference variable (the ID must be greater than zero).

Add a "search" member function to the Employee class which determines if its employee ID number and name match an ID number and name presented to it; the member function will accept, into its parameter list, an employee ID number and name, and will return "true" if the employee is found, or "false" if not.

In main create an array of 100 Employee objects using the default constructor.

The program will repeatedly execute four menu items selected by the user, in main:

1) in a function, store in the array of Employee objects the user-entered data shown below (but program to allow an unknown number of objects to be stored, up to 100).

2) in a second function, display the employee data from the array.

3) have the user enter an employee ID number in main and call the "search" member function described above; if the ID is found display in main the associated employee data; if not found, display in main an error message (hint: process the array in main).

4) end the program

Provide four screen prints:

-execute menu option #1 (have the user enter the data for the three employees shown below)

-execute menu option #3 (have the user enter ID Number 39119)

-execute menu option #2

-execute menu option #3 (have the user enter ID Number 53179)

Employee data for user to enter (name; id; department; position):

Susan Meyers; 47899; Accounting; Vice President

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!