-
Notifications
You must be signed in to change notification settings - Fork 0
/
Customer.java
101 lines (80 loc) · 2.08 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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package tgv;
/**
*
* @author MSI GL62
*/
public class Customer {
private int arrivalTime;
private String type;
private int numOfTicket;
private int startTime;
private int endTime;
private int processingTime;
private int waitingTime;
private Counter counter;
private String queue;
public Customer(int at, String t, int nt){
arrivalTime = at;
numOfTicket = nt;
counter = null;
switch(t){
case "N":
type = "N";
queue = "normal";
break;
case "V":
type = "VIP";
queue = "VIP";
}
}
public int getArrivalTime() {
return arrivalTime;
}
public String getType() {
return type;
}
public int getNumOfTicket() {
return numOfTicket;
}
public int getEndTime() {
return endTime;
}
public int getStartTime() {
return startTime;
}
public int getProcessingTime() {
return processingTime;
}
public int getWaitingTime() {
return waitingTime;
}
public Counter getCounter() {
return counter;
}
public String getQueue() {
return queue;
}
public void setStartTime(int startTime) {
this.startTime = startTime;
}
public void setEndTime(int endTime) {
this.endTime = endTime;
}
public void setProcessingTime(int processingTime) {
this.processingTime = processingTime;
}
public void setWaitingTime(int waitingTime) {
this.waitingTime = waitingTime;
}
public void setCounter(Counter counter) {
this.counter = counter;
}
public String toString(){
return counter.toString();
}
}