Example 10-10 defined a classpersonType 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:
a. Set the first name only.
b. Set the last name only.
c. Store and get the middle name.
d. Check whether a given first name is the first name of this person.
e. Check whether a given last name is the same as the last name of this person. Write the definition of the member functions to implement the operations for this class. Also, write a program to test various operations on this class.
--------------------------------
Example 10-10
#include <string>
using namespace std;
class personType
{
public:
void print () const;
//Function to outputthe first name and last name in the form firstNamelastName
void setName (string first, stringlast);
//Function to set firstName andlastName according to the parameters. Postcondition: firstName =first; lastName = last;
String getFirstName () const;
//Function to return the first name. Postcondition: The valueof the first name is returned.
String getLastName () const;
//Function to return the last name. Postcondition: Thevalue of the last name is returned.
personType (string first = “ “, stringlast= “ “);
//Constructor
//Sets firstName and lastName according to theparameters.
//The default values of the parameters are nullstrings
//Postcondition: firstName = first; lastName =last;
private:
string firstName; //variable to store the firstname.
string lastName; //variable to store the last name.
};
HI
Contact me for an efficient, well documented and perfect solution
and development of your project. I ensure quality work with always
on time delivery of project and dedicated support and follow up.
Thanks
Farah Saif
Hi, I am placing my bid on your project because I have read the requirements and I am confident enough with my C++ and algorithm skills. I am focused mostly on doing computer science homework here in freelancer.com and I would like to help you get this project done if you would give me the opportunity. I am a computer science professor and practitioner and this assignment is one of the fields that I teach very well so I can assure you an accurate result.
Let me know if you are interested so I can start. Thanks.
Hi there,
I've read the description and understood the requirements, I can do this one for you. I'm really interested in doing this project. A little bit about my background: I'm a computer systems engineer graduated from an Australian university. I have good background in mathematics, algorithms and programming skills. So really hope to have a chance to work with you, thanks for your consideration!
Regards.
I have done some projects in programming for students around the world and got some positive feedbacks from clients. I have very high Completion Rate and all 5-star rating. You can check my profile for more information. Let me help you.
Hi,
I have a great experience in c/c++/c# and java. It's an easy task for me and I can do it for you without any difficulties. It's a student's homework and I'm a student too. That's why you have to select my bid. I'll implement the task in the best way. And it will be done like by a perfect student, in a simple way, but not like a professional programmer.
To be sure of the quality of my work - please, see my profile. I have the 5 stars reviews for every project. Contact me please for more information.
Best regards,
Pavel.
Sir I have proven ability to design, plan and lead high-impact programs.I can do this project easily.I am looking forward to speak with you about these Projects.
Thanks.
Hi..
I am Nikhil.
I have working experience of 3+ year in C++ Development.
I have done work on:
1. Data Structure like: Set, Vector, Linked list, Tree(Any type), Graph.
2. STL ( Tamplate Library)
3. Overloading and Overriding
4. Virtual functions
and many more.
Let start conversation so you get to know about my skills and ability.
Please give me a chance to do work with you and I am promising you
that you will not disappoint by me.
I got your requirements and I am very sure that I will do this less then a day.
Please give a chance to conversation with you.
I am waiting for your positive response.
Thank you.
I'm a CS graduate. I helped students here in their assignments. I worked as teacher assistant in "Think Like a Programmer" which teaches 1st-2nd students Data Structures and OOP using C++. You can check my resume and if you accepted, just let me know to start immediately as this is a simple task. Thanks
Hello!
I'm computer engineer and expert programmer of C++,OOP etc. I'm also teaching in university and had give this type of scenarios to my students as assignments. You can trust me, I'll complete this task in time.
Hi,
I have done many project in C and C++. So it will take only one hour for me to complete this project.
I will give you a module (class) with all the functions as you mentioned.
1) Print() -- to print the FirstName and LastName as (FirstName LastName)
2) GetFirstName() -- to get first name only.
3) GetLastName() -- to get last name only.
3) GetMiddleName() -- to get middle name only.
4) SetName() -- To Set the name.
5) SetFirstName() -- To Set the first name.
6) SetLastName() -- To Set the last name.
6) SetMiddleName() -- To Set the middle name.
The names will be stored in variables, as per your requirement.
Thank you.
Hi huynguyen93! I'm professional C++ programmer. I understand what do you need and I can get it for you quickly. I will start the work asap and will help with understanding the code. Do you need more? Don't hesitate to ask me! Best regards!