-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomer.java
141 lines (125 loc) · 3.96 KB
/
Customer.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/**
* Customer Class is to handle the information of customer so that the program can access them easily.
* A Customer object should contain the following private members:
* String Cust_username - The customer's username,
* String Cust_password - The customer's password,
* String Cust_fullname - The customer's fullname,
* String Cust_phonenum - The customer's phone number,
* String Cust_status - The customer's status [could be normal/case/close]
*/
public class Customer {
//Private Members
private String Cust_username;
private String Cust_password;
private String Cust_fullname;
private String Cust_phonenum;
private String Cust_status;
//Methods
/**
* Default Constructor
*/
public Customer() {
}
/**
* Constrcutor
* @param Cust_username the customer's username
* @param Cust_password the customer's password
* @param Cust_fullname the customer's fullname
* @param Cust_phonenum the customer's phone number
* @param Cust_status the customer's status
*/
public Customer(String Cust_username, String Cust_password, String Cust_fullname,
String Cust_phonenum,String Cust_status) {
this.Cust_username = Cust_username;
this.Cust_password = Cust_password;
this.Cust_fullname = Cust_fullname;
this.Cust_phonenum = Cust_phonenum;
this.Cust_status = Cust_status;
}
/**
* Method of converting list into display format in console
* @return Cust_username Cust_password Cust_fullname Cust_phonenum Cust_status
*/
public String toString() {
return Cust_username + " " + Cust_password + " " + Cust_fullname + " " + Cust_phonenum + " " + Cust_status;
}
/**
* Method of converting list into CSV format
* @return Cust_username,Cust_password,Cust_fullname,Cust_phonenum,Cust_status
*/
public String toCSVString() {
return Cust_username + "," + Cust_password + "," + Cust_fullname + "," + Cust_phonenum + "," + Cust_status;
}
//Getter
/**
* Method of getting customer's username
* @return the Customer's username
*/
public String getCust_username(){
return Cust_username;
}
/**
* Method of getting customer's password
* @return the Customer's password
*/
public String getCust_password(){
return Cust_password;
}
/**
* Method of getting customer's fullname
* @return the Customer's fullname
*/
public String getCust_fullname(){
return Cust_fullname;
}
/**
* Method of getting customer's phone number
* @return the Customer's phone number
*/
public String getCust_phonenum(){
return Cust_phonenum;
}
/**
* Method of getting customer's status
* @return the Customer's status
*/
public String getCust_status(){
return Cust_status;
}
//Setter
/**
* Method of setting customer's username
* @param Cust_username the customer's username
*/
public void set_Customerusername(String Cust_username){
this.Cust_username = Cust_username;
}
/**
* Method of setting customer's password
* @param Cust_password the customer's password
*/
public void set_Customerpassword(String Cust_password){
this.Cust_password = Cust_password;
}
/**
* Method of setting customer's fullname
* @param Cust_fullname the customer's fullname
*/
public void set_Customerfullname(String Cust_fullname){
this.Cust_fullname = Cust_fullname;
}
/**
* Method of setting customer's phone number
* @param Cust_phonenum the customer's phone number
*/
public void set_Customerphonenum(String Cust_phonenum){
this.Cust_phonenum = Cust_phonenum;
}
/**
* Method of setting customer's status
* @param Cust_status the customer's status
*/
public void set_Customerstatus(String Cust_status){
this.Cust_status = Cust_status;
}
}