-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomer.java
More file actions
47 lines (45 loc) · 938 Bytes
/
Copy pathCustomer.java
File metadata and controls
47 lines (45 loc) · 938 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
class Customer{
private String cusId;
private String name;
private int qty;
private int orderStatus;
Customer(String cusId,String name,int qty,int status){
this.cusId=cusId;
this.name=name;
this.qty=qty;
this.orderStatus = status;
}
public void setCusId(String cusId){
this.cusId=cusId;
}
public void setName(String name){
this.name=name;
}
public void setQty(int qty){
this.qty=qty;
}
public void setStatus(int status){
this.orderStatus=status;
}
public String getCusId(){
return cusId;
}
public String getName(){
return name;
}
public int getQty(){
return qty;
}
public int getStatus(){
return orderStatus;
}
public String toString(){
return cusId+","+name+","+qty+","+orderStatus;
}
public String getOrderStatus(int orderStatus){
if (orderStatus==0)return "Preparing";
if (orderStatus==1)return "Deliverd";
if (orderStatus==2)return "Cancel";
return "Cannot Find";
}
}