public class Contact
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Contact()
Creates a new instance of Contact
|
Contact(java.lang.String firstName,
java.lang.String lastName,
int phoneNumber)
Creates a new instance of Contact
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFirstName()
Returns the firstname of the Contact.
|
java.lang.String |
getLastName()
Returns the lastname of the Contact.
|
int |
getPhoneNumber()
Returns the phoneNumber of the person.
|
void |
setFirstName(java.lang.String firstName)
Sets the first name of the Contact.
|
void |
setLastName(java.lang.String lastName)
Sets the last name of the Contact.
|
void |
setPhoneNumber(int phoneNumber)
Sets the phone number of the Contact.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
public Contact()
public Contact(java.lang.String firstName, java.lang.String lastName, int phoneNumber)
firstName
- The first name of a contactlastName
- The last name of a contactphoneNumber
- The phone number of a contactpublic java.lang.String getFirstName()
public java.lang.String getLastName()
public int getPhoneNumber()
public void setFirstName(java.lang.String firstName)
firstName
- The first name of a contactpublic void setLastName(java.lang.String lastName)
lastName
- The last name of a contactpublic void setPhoneNumber(int phoneNumber)
phoneNumber
- The phone number of a contactpublic java.lang.String toString()
toString
in class java.lang.Object