public class Contact extends Object
phoneNumber
, displayName
. We can access these fields with
getters and setters.Constructor and Description |
---|
Contact() |
Modifier and Type | Method and Description |
---|---|
String |
getDisplayName()
This returns the display name of a contact so we can display it.
|
String |
getPhoneNumber()
This returns the phone number of the contact
|
void |
setDisplayName(String displayName)
Setter that allows us to change the display name of a contact, necessary
|
void |
setPhoneNumber(String phoneNumber)
This sets the phone number of a contact.
|
public String getPhoneNumber()
public void setPhoneNumber(String phoneNumber)
phoneNumber
- this is a parameter, phone number.public String getDisplayName()
public void setDisplayName(String displayName)
displayName
- a parameter, contact's display name.