-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuardianUser.java
34 lines (28 loc) · 1.03 KB
/
GuardianUser.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
import java.util.ArrayList;
import java.util.UUID;
public class GuardianUser extends User {
private ArrayList<Child> children;
private int campDuration;
private ArrayList<String> campDates;
public GuardianUser(String firstName, String lastName, int phoneNumber, String email, String password, String dateOfBirth, UUID id, ArrayList<Child> children, int campDuration, ArrayList<String> campDates) {
super(firstName, lastName, phoneNumber, email, password, dateOfBirth, id);
this.children = children;
this.campDuration = campDuration;
this.campDates = campDates;
}
public void addChild(Child child){
this.children.add(child);
}
public Child getChild(String name){
Child theChild = null;
for (Child child : children) {
if(child.getFirstName().equals(name))
theChild = child;
}
return theChild;
}
public String toString()
{
return super.toString();
}
}