Question: C++ Example 10-10 defined a class personType to store the name of a person. The member functions that we included merely print the name and

C++

Example 10-10 defined a class personType to store the name of a person. The member functions that we included merely print the name and set the name of a person. Redefine the class personType so that, in addition to what the existing class does, you can:

  1. Set the first name only.

  2. Set the last name only.

  3. Store and set the middle name.

  4. Check whether a given first name is the same as the first name of this person.

  5. Check whether a given last name is the same as the last name of this person. Write the definitions of the member functions to implement the operations for this class. Also, write a program to test various operations on this class.

Include a main.cpp file, a personType.h file, and a personTypeImp.cpp file

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!