Question: Java help a) Read the elass Person to store the name a person we discuss in the class (source is Person.java attached in the assignment).
a) Read the elass Person to store the name a person we discuss in the class (source is Person.java attached in the assignment). As we can see that the methods we included merely set the name and print the name of a person. Redefine the class person so that, in addition to what existing Class does, you can Set the last name only Set the first name only. Set the middle name. Check whether a given last name is the same as the last name of this person. Check whether a give first name is the same as the first name of this person. Check whether a given middle name is the same as the middle name of this person. b) Add the method equals that returns true if two objects contains the same first and last name. e) Add the method makeCopy that copies the instance of variables of a Person object into another Person object. d) Add the method getCopy that creates and returns the address of the object, which is a copy of another Person Object. Write the definition of the methods of the class Person to implement the operation of this Class Write a program that tests various operation of the Class Person. e) f)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
