-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContact.java
More file actions
54 lines (53 loc) · 1013 Bytes
/
Contact.java
File metadata and controls
54 lines (53 loc) · 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
public class Contact
{
private String firstName;
private String lastName;
private String phoneNumber;
private String email;
public Contact(String firstName, String lastName, String phoneNumber, String email)
{
this.firstName = firstName;
this.lastName = lastName;
this.phoneNumber = phoneNumber;
this.email = email;
}
public void setFirstName(String first)
{
firstName = first;
}
public String getFirstName()
{
return firstName;
}
public void setLastName(String last)
{
lastName = last;
}
public String getLastName()
{
return lastName;
}
public void setphNum(String phone)
{
phoneNumber = phone;
}
public String getPhone()
{
return phoneNumber;
}
public void setEmail(String email)
{
this.email = email;
}
public String getEmail()
{
return email;
}
public void printC()
{
System.out.print(this.getFirstName() + " " + this.getLastName() + " ");
System.out.print(this.getPhone()+" ");
System.out.println(this.getEmail());
System.out.println();
}
}