Question: I need this in Java please Create a class named AddressBook that has the following field names: firstName, middleName, lastName, homeAddress, businessPhone, homePhone, cellphone, skypeId,

I need this in Java please

Create a class named AddressBook that has the following field names: firstName,

middleName,

lastName,

homeAddress,

businessPhone,

homePhone,

cellphone,

skypeId,

facebookId,

and personalWebSite.

Use appropriate data types to store the values for these fields in AddressBook objects.

Create appropriate get and set methods to retrieve and assign values to these names. For example, getMiddleName(viveAddressBook) should return the middle name of the person Vive. Similarly, vive.setPersonalWebsite(url) should set the personal website of the person Vive to the specified URL object.

Using the get and set methods, create a comparison method compareNames(name1, name2) that compares the first, middle, and last names of strings name1 and name2. Assume that name1 and name2 follow the following format: FirstName M. LastName.

Test your program for correct, partially correct (e.g., name string without the middleName), and incorrect inputs (e.g., phone number containing special characters).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!