Question: Please write the following code in C++ and create the header files and cpp files with comments. 1. Write and test a friend function that

Please write the following code in C++ and create the header files and cpp files with comments.

1. Write and test a friend function that checks to see if the phone number of a C1SCEmployee object is equal to the phone number of a Programmer object. Test equal and not equal scenarios.(You will need to call your ChangePhoneNumber method) 2. Overload the equality operator to see if the phone number of two C1SCEmployees are the same. Test equal and not equal scenarios. (You will need to call your ChangePhoneNumber method) 3. Write an addition member function that adds an integer to a CS1Cemployees age (make sure the integer is a passed parameter). The output should state how many years were added to the age. 4. Overload the addition operator to add a constant to a CS1Cemployees age. For example: StarC1SCEmployee = StarC1SCEmployee + 2. The output should state how many years were added to the age. 5. Overload << and >> operators to read in a CS1Cemployee object (e.g. cin >> myEmployee and cout << myEmployee)

Note: CS1Cemployee's program is shown in the answer from https://www.chegg.com/homework-help/questions-and-answers/c-class-constructs-inheritance--create-date-class-attributes-month-day-year-b-create-emplo-q43962687

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!