Question: 4 . a . Example 8 - 8 defined theclassPersonto store the name of a person.The methods that we included merely set the name and
aExample defined theclassPersonto store the name of a person.The methods that we included merely set the name and print the nameof a person. Redefine theclassPersonso that, in addition to what theexistingclassdoes, you can:iSet the last name only.iiSet the first name only.iii.Set the middle name.ivCheck whether a given last name is the same as the last name of thisperson.vCheck whether a given first name is the same as the first name ofthis person.viCheck whether a given middle name is the same as the middlename of this person.bAdd the methodequalsthat returns true if two objects contain thesame first, middle, and last name.cAdd the methodmakeCopythat copies the instance variables of aPersonobject into anotherPersonobject.dAdd the methodgetCopythat creates and returns the address of theobject, which is a copy of anotherPersonobject.eAdd the copy constructor.fWrite the definitions of the methods of theclassPersonto implementthe operations for thisclass.gWrite a program that tests various operations of theclassPerson.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
