Repository navigation
Expand file tree
/
Copy pathSeat.java
More file actions
63 lines (49 loc) · 1.37 KB
/
Copy pathSeat.java
File metadata and controls
63 lines (49 loc) · 1.37 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
61
public class Seat {
// Attributes
private int seatID;
private char seatRow;
private int seatCol;
private boolean isRUReserved; // for seats that are first-come first-served reserved by RUs.
private boolean isAvailable;
private int showtimeID;
public Seat(int seatID, char seatRow, int seatCol, int showtimeID, boolean isAnRUSeat, boolean isAvailable) {
this.seatID = seatID;
this.seatRow = seatRow;
this.seatCol = seatCol;
this.showtimeID = showtimeID;
this.isRUReserved = isAnRUSeat;
this.isAvailable = isAvailable;
}
@Override
public String toString(){
return String.valueOf(seatRow) + seatCol;
}
// Getters and Setters
public int getSeatID() {
return seatID;
}
public void setSeatID(int seatID) {
this.seatID = seatID;
}
public char getSeatRow() {
return seatRow;
}
public void setSeatRow(char seatRow) {
this.seatRow = seatRow;
}
public int getSeatCol() {
return seatCol;
}
public void setSeatCol(int seatCol) {
this.seatCol = seatCol;
}
public boolean isAnRUSeat() {
return isRUReserved;
}
public void setAvailable(boolean isAvailable) {
this.isAvailable = isAvailable;
}
public boolean getAvailable(){
return isAvailable;
}
}