-
Notifications
You must be signed in to change notification settings - Fork 0
/
Session.java
68 lines (60 loc) · 1.33 KB
/
Session.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
import java.util.ArrayList;
/**
* @author Andrew Chisolm, Bryan Munoz, Matt Olson, Daniel Ruiz, Jaden Arnold
* Each session has up to nine cabins.
* Each session lasts one week.
*/
public class Session {
private ArrayList<Cabin> cabins;
private int week;
private String theme;
/**
* Sets the Session information
* @param week The week of the session
*/
public Session(int week) {
this.week = week;
cabins = new ArrayList<Cabin>();
}
/**
* Accessor for week
* @return week
*/
public int getWeek() {
return week;
}
/**
* Accessor for theme
* @return theme
*/
public String getTheme() {
return theme;
}
/**
* Accessor for cabins
* @return cabins
*/
public ArrayList<Cabin> getCabins() {
return cabins;
}
/**
* Sets the theme for the session
* @param theme the theme
*/
public void setTheme(String theme) {
this.theme = theme;
}
/**
* Adds a cabin to the session
* @param cabin the cabin being added
*/
public void addCabin(Cabin cabin) {
cabins.add(cabin);
}
/**
* Returns Session formation in a readable format
*/
public String toString() {
return "Week " + this.week + ": " + this.theme;
}
}