-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBabysittingRequest.java
More file actions
28 lines (22 loc) · 1.04 KB
/
BabysittingRequest.java
File metadata and controls
28 lines (22 loc) · 1.04 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
package babysitting;
import java.util.Scanner;
public class BabysittingRequest {
public static void requestABabysitter(Mother mom) {
//create a call object when two people's phone numbers are connected
//and cannot receive any other calls
System.out.println("When do you need a babysitter for? ");
Scanner keyboard = new Scanner(System.in);
String dateNeeded = keyboard.nextLine();
String momRequest = mom.request(dateNeeded);
System.out.println("Please hang on while we contact the babysitters in your area.");
Babysitter babysitter = findABabysitter(mom.getAddress());
System.out.println(babysitter.getName() + ", " + mom.getName() + "has submitted a request for babysitting. Here is her message:"
+ momRequest);
System.out.println("This is your wonderful babysitter!" + babysitter.toString());
}
public static Babysitter findABabysitter(String address) {
//create a Babysitter object
Babysitter babysitter = new Babysitter("Jenna","123 Grapes Lane","6453216598");
return babysitter;
}
}