firstname firstage //public void displayperson(system out print(last namelastname)system out print("first namefirstname)system out println("ageage)//public string getlast(return lastname/end class person /get last name we show only three variables in this classfor person' last namefirst nameand age of courserecords for most applications would contain many additional fields constructor enables new person object to be created and its fields initialized the displayperson(method displays person object' dataand the getlast(method returns the person' last namethis is the key field used for searches the classdataarray java program the program that makes use of the person class is similar to the higharray java program that stored items of type double only few changes are necessary to adapt that program to handle person objects here are the major onesthe type of the array is changed to person the key field (the last nameis now string objectso comparisons require the equals(method rather than the =operator the getlast(method of person obtains the last name of person objectand equals(does the comparisonifa[jgetlast(equals(searchname/found itemthe insert(method creates new person object and inserts it in the arrayinstead of inserting double value the main(method has been modified slightlymostly to handle the increased quantity of output we still insert itemsdisplay themsearch for onedelete three itemsand display them all again here' the listing for classdataarray java/classdataarray java /data items as class objects /to run this programc>java classdataapp import java io */for / ///////////////////////////////////////////////////////////////class person