-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCabin.java
137 lines (114 loc) · 2.82 KB
/
Cabin.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import java.util.ArrayList;
import java.util.UUID;
public class Cabin {
/**
* Initialized my variables that will be utilized throughout the class
*/
private StaffUser counselor;
private ArrayList<Child> camperGroup;
private String name;
private int minAge;
private int maxAge;
private Schedule[] schedule;
private UUID thisUUID;
/**
* Constructor for Cabin class
* @param name initialize the String name in the parameter
* @param UUID initializes the UUID to thisUUID
*/
public Cabin(String name, UUID UUID)
{
this.name = name;
this.thisUUID = UUID;
}
/**
*
*/
public Cabin(String name, UUID UUID, StaffUser counselor, ArrayList<Child> camperGroup, int minAge, int maxAge, Schedule[] schedule) {
this.name = name;
this.thisUUID = UUID;
this.counselor = counselor;
this.camperGroup = camperGroup;
this.minAge = minAge;
this.maxAge = maxAge;
this.schedule = schedule;
}
/**
* @param name Creates a random UUID with string name
*/
public Cabin(String name) {
this(name, UUID.randomUUID());
}
/**
* Allows the child to be set to their camper group
* @param child adds the child to camper group arraylist
*/
public void addToGroup(Child child) {
this.camperGroup.add(child);
}
/**
* get statement that returns the counselor
* @return this.counselor
*/
public StaffUser getCounselor()
{
return this.counselor;
}
/**
* get statements that returns the arraylist of camperGroup
* @return this.camperGroup
*/
public ArrayList<Child> getCamperGroup()
{
return this.camperGroup;
}
/**
* get statement that returns name
* @return this.name
*/
public String getName()
{
return this.name;
}
/**
* get statement that returns minAge
* @return this.minAge
*/
public int getMinAge()
{
return this.minAge;
}
/**
* get statement that returns maxAge
* @return this.maxAge
*/
public int getMaxAge()
{
return this.maxAge;
}
/**
* get statement that returns schedule
* @return this.schedule
*/
public Schedule[] getSchedule()
{
return this.schedule;
}
/**
* get statement that returns the UUID
* @return this.thisUUID
*/
public UUID getUUID()
{
return this.thisUUID;
}
/**
* to string method that prints and return all the values previously declared within the class
*/
public String toString()
{
return "Name: " + this.name + "\n" +
"Min Age: " + this.minAge + " Max Age: " + this.maxAge + "\n" +
"UUID: " + this.thisUUID;
}
}