Create a program that has an object type of contact this


Create a program that has an object type of Contact. This contact will need to have the following attributes: Name, Birth Date, Phone Number, Address and Eye Color

You should write a simple program that prompts the user to create 2 new contacts. Once the contacts are created you need to print out their information in a readable manner (completely up to you - but all traits must be displayed).

Finally, we need to prompt the user for a new name of the first contact. Once the new name is entered you need to print out the 2 contacts again (the first contacts name should be changed)

Here is what I have so far not sure if its correct:

public class Contact{

private String name;

private String phoneNumber;

private String birthDate;

private String address;

private String eyeColor;

public String getName() {

return name;

}

public void setName(String newName) {

name = newName;

}

public String getPhoneNumber() {

return phoneNumber;

}

public void setPhoneNumber(String newPhoneNumber) {

phoneNumber = newPhoneNumber;

}

public String getBirthDate() {

return birthDate;

}

public void setBirthDate(String newBirthDate) {

birthDate = newBirthDate;

}

public String getAddress() {

return address;

}

public void setAddress(String newAddress) {

address = newAddress;

}

public String getEyeColor() {

return eyeColor;

}

public void setEyeColor(String newEyeColor) {

eyeColor = newEyeColor;

}

}

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Create a program that has an object type of contact this
Reference No:- TGS01090120

Expected delivery within 24 Hours