-
Notifications
You must be signed in to change notification settings - Fork 0
/
Reservation.java
47 lines (39 loc) · 1.02 KB
/
Reservation.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
import java.util.*;
public class Reservation {
private String date;
private String time;
private ArrayList<Integer> seatIds;
private int reservationId;
private int showingId;
private Movie movie;
public Reservation(Movie m, String date, String time, int seatId, int reservationId, int showingId) {
movie = m;
this.date = date;
this.time = time;
this.reservationId = reservationId;
this.showingId = showingId;
seatIds = new ArrayList<Integer>();
seatIds.add(seatId);
}
public Movie getMovie() {
return movie;
}
public String getDate() {
return date;
}
public String getTime() {
return time;
}
public ArrayList<Integer> getSeatIds() {
return seatIds;
}
public int getReservationId() {
return reservationId;
}
public int getShowingId() {
return showingId;
}
public void addSeatId(int s) {
seatIds.add(s);
}
}