Question: Lab 3 Direction: Submit the typed source code or git url. All tasks must be completed. Each team member is required to do at least

 Lab 3 Direction: Submit the typed source code or git url.

Lab 3 Direction: Submit the typed source code or git url. All tasks must be completed. Each team member is required to do at least 1 task. And no group can exceed 3 members Employee For this lab, you will define the three classes Name, Address and Employee Your group will have to rewrite the given method so that they perform their descriptions correctly I. The header file Name.h contains the class Name, which consists of o Private string fiekd named firstName o Private string fiekd named lastName. Public default constructor that assigns the empty string to both irstName and lastName. Public overloaded constructor that takes two strings as pararneten nalned irstNarne and I slNarne respectively If the parameters are valid names (they consist of only letters), they should be assigned to their respective fields (match the names); however, if any parameter is invalid, assign its respective field the empty string Public copy constructor that porforms a shallow copy. Public overloaded assignment operator that performs a shallow copy. Public get method forfustName. Public get method for lastName. o Public set method for firstName that assigns the parameter to first Name only if it is a valid name o Public set method for last Name that assigns the parameter to lastName only if it is a valid name. o Public string constant method named ToString) that takes no parameters. It returns a string with the format first Name followed lby lastName with a space between them o Public overloaded ostream operator that the displays a Name object in the same format as ToString) Lab 3 Direction: Submit the typed source code or git url. All tasks must be completed. Each team member is required to do at least 1 task. And no group can exceed 3 members Employee For this lab, you will define the three classes Name, Address and Employee Your group will have to rewrite the given method so that they perform their descriptions correctly I. The header file Name.h contains the class Name, which consists of o Private string fiekd named firstName o Private string fiekd named lastName. Public default constructor that assigns the empty string to both irstName and lastName. Public overloaded constructor that takes two strings as pararneten nalned irstNarne and I slNarne respectively If the parameters are valid names (they consist of only letters), they should be assigned to their respective fields (match the names); however, if any parameter is invalid, assign its respective field the empty string Public copy constructor that porforms a shallow copy. Public overloaded assignment operator that performs a shallow copy. Public get method forfustName. Public get method for lastName. o Public set method for firstName that assigns the parameter to first Name only if it is a valid name o Public set method for last Name that assigns the parameter to lastName only if it is a valid name. o Public string constant method named ToString) that takes no parameters. It returns a string with the format first Name followed lby lastName with a space between them o Public overloaded ostream operator that the displays a Name object in the same format as ToString)

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!