C++ Question

In c++, define 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:

  • Set the first name only.
  • Set the last name only.
  • Store and set the middle name.
  • Check whether a given first name is the same as the first name of this person.
  • 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.

Task #01: isFirstName correctly determines if a name is a student’s first name

Task #02: isLastName correctly determines if a name is a student’s first name

Task #03: The program can initialize a personType object without error

Task #04: personType getters and setters work as expected

personType.h header file contains the following:



#include <string>

using namespace std;

class personType



void print() const;

void setName(string first, string middle, string last);

void setLastName(string last);

void setFirstName(string first);

void setMiddleName(string middle);

bool isLastName(string last) const;

bool isFirstName(string first) const;

string getFirstName() const;

string getMiddleName() const;

string getLastName() const;

personType(string first = “”, string middle = “”, string last = “”);


string firstName;

string middleName;

string lastName;



C++ Question

We offer the best custom writing paper services. We have answered this question before and we can also do it for you.


We offer the bestcustom writing paper services. We have done this question before, we can also do it for you.

Why Choose Us

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How it Works

  • Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the "PAPER DETAILS" section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.