-
Notifications
You must be signed in to change notification settings - Fork 0
/
Contact.java
39 lines (31 loc) · 1.23 KB
/
Contact.java
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
package contacts_list;
import java.util.ArrayList;
public class Contact extends FullName{
public String nickname;
public String address;
public String workPhoneNumber;
public String privatePhoneNumber;
protected static ArrayList<Contact> Contacts = new ArrayList<>();
public Contact(String ln, String fn, String nickname, String address, String workPhoneNumber, String privateNumber){
super(ln, fn);
this.nickname = nickname;
this.address = address;
this.workPhoneNumber = workPhoneNumber;
this.privatePhoneNumber = privateNumber;
}
public Contact(){
super();
this.nickname = null;
this.address = null;
this.workPhoneNumber = null;
this.privatePhoneNumber = null;
}
public String toString(){
String ret = super.toString() + "\t" + nickname + "\t" + address + "\t" + workPhoneNumber + "\t" + privatePhoneNumber;
return ret;
}
public String getNickname() { return nickname; }
public String getAddress() { return address; }
public String getWorkPhoneNumber() { return workPhoneNumber; }
public String getPrivatePhoneNumber() { return privatePhoneNumber; }
}