I need to create two separate java codes resulting in the


I need to create two separate Java codes resulting in the same output (one using Apache Commons library and one using the standard Java methods). The program should count all people with the same last name and then change the last name to Doe.

When using the Apache Commons library it has been suggested to use countMatches(), select() and replace() or overlay() methods though I have not been able to find documentation on the select() method.

I have attached my Person class and the Tester programs which reads in a text file with the Person data , parses the data and puts into an arrayList and then sorts by last name. All of this is functional. The problem I run into is comparing the last names. If I could specify in advance the string I am comparing and just spit that count out I can do that easily, however I do not know how to start this when I do not know what if any names match.

Attachment:- Person.zip

Solution Preview :

Prepared by a verified Expert
JAVA Programming: I need to create two separate java codes resulting in the
Reference No:- TGS01249477

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)