-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMother.java
More file actions
78 lines (59 loc) · 1.45 KB
/
Mother.java
File metadata and controls
78 lines (59 loc) · 1.45 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package babysitting;
import java.time.LocalDate;
public class Mother {
private String name;
private int numKids;
private String address;
private String phoneNum;
private boolean needsBabysitter;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getNumKids() {
return numKids;
}
public void setNumKids(int numKids) {
this.numKids = numKids;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getPhoneNum() {
return phoneNum;
}
public void setPhoneNum(String phoneNum) {
this.phoneNum = phoneNum;
}
public boolean isNeedsBabysitter() {
return needsBabysitter;
}
public void setNeedsBabysitter(boolean needsBabysitter) {
this.needsBabysitter = needsBabysitter;
}
public int getNumRequests() {
return numRequests;
}
public void setNumRequests(int numRequests) {
this.numRequests = numRequests;
}
private int numRequests = 0;
public Mother(String name, int numKids, String address, String string) {
this.name = name;
this.numKids = numKids;
this.address = address;
this.phoneNum = string;
}
public String request(String date) {
this.numRequests++;
this.needsBabysitter = true;
String message = "Would you be able to " +
"babysit for me on " + date + "?";
return message;
}
}