Question: Using c++ Problem 3 Classes 10 points Create a class called Employee. The class should have the following members: firstName: string .lastName: string . pay:

Using c++  Using c++ Problem 3 Classes 10 points Create a class called

Problem 3 Classes 10 points Create a class called Employee. The class should have the following members: firstName: string .lastName: string . pay: int Create a dynamically allocated array of n employee variables where n is a number entered by the user. Validate the input until a positive integer is entered. Create a function that expects the array as input. The function populates the array with employee objects entered by a user by looping through the array and letting the user input the data for each employee. Create a second function that expects a pointer to the array as input and prints the elements in the array. Remember that arrays are passed by reference, that is, any modifications inside the function will be reflected in the caller's array. Call both functions from the main Number of employees: 2 Employee 1 First Name: Allen Last Name: Harper Pay: 1000 Employee 2 First Name: John Last Name: Doe Pay: 500 Example: Employees: Name: Allen Harper (1000) Name: John Doe (500)

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!