Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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).

Please use attributes and operations provided in image.

Thank you so much :)

image text in transcribed

AddressBook Attributes +private String businessPhone +private String facebookld private String firstname +private String homePhone +private String lastName +private String middleName +private String personalWebSite +private String skypeld public AddressBook(String fn, String mn, String In, String homeAddress, String businessPhone, String homePhone, String cellPhone, String skypeld, String facebookld, String personalWebSite) +public AddressBook(String fn, String mn) public AddressBook(String fn, String mn, String In) public static String compareNames(String namel, String name2) public String getBusinessPhoneo + public String getCellPhoneo +public String getFirstName) +public String getHomeAddress0 + public String getHomePhone0 + public String getLastNameO +public String getMiddleName0 public String getPersonalWebSite0 + public String getSkypeldO public void setBusinessPhone(String businessPhone) +public void setCellPhone(String cellPhone) public void setFacebookld(String facebookld) +public void setFirstName(String firstName) +public void setHomeAddress(String homeAddress) public void setHomePhone(String homePhone) +public void setMiddleNaeString middleName) +public void setPersonalWebSite (String personalWebSite) +public void setSkypeld(String skypeld)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

f. Did they change their names? For what reasons?

Answered: 1 week ago