-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomer.java
More file actions
60 lines (47 loc) · 1.32 KB
/
Customer.java
File metadata and controls
60 lines (47 loc) · 1.32 KB
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
55
56
57
58
59
60
public class Customer{
private String name;
private int ccn;
private String email;
private Queue wishlist;
private Customer next;
private List watchlist;
public Customer(String name0, int ccn0, String email0){
name = name0;
ccn = ccn0;
email = email0;
}
public String getName(){ //creates method that will return name
return name; //returns name of node
}
public void setName(String name0){ //sets name of node to new name
name = name0; //takes name given and sets it to name
}
public void setCCN(int ccn0){ //sets CCN of node to new CCN
ccn = ccn0; //takes CCN given and sets it to new CCN
}
public int getCCN(){ //creates method that will return CCN
return ccn; //returns CCN
}
public String getEmail(){ //creates method that will return email
return email; //returns email of node
}
public void setEmail(String email0){ //sets name of node to new email
email = email0; //takes email given and sets it to email
}
public int getCCNKey(){//gets the key of the CCN
//the key is the last 4 digits of the CCN
return ccn%10000;//takes mode 10000 of CCN to return last four digits
}
public Queue getWishList(){
return wishlist;
}
public List getWatchList(){
return watchlist;
}
public Customer getNext(){
return next;
}
public void setNext(Customer next0){
next = next0;
}
}