-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmergencyContact.java
43 lines (38 loc) · 1.05 KB
/
EmergencyContact.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
/**
* @author Andrew Chisolm, Bryan Munoz, Matt Olson, Daniel Ruiz, Jaden Arnold
* Represents an emergency contact
*/
public class EmergencyContact {
private String phone;
private String name;
/**
* Sets the emergency contact information
* @param phone
* @param name
*/
public EmergencyContact(String name, String phone) {
this.phone = phone;
this.name = name;
}
/**
* Gets the phone number for the emergency contact
* @return The phone number of the emergency contact
*/
public String getPhone() {
return phone;
}
/**
* Gets the name of the emergency contact
* @return The name of the emergency contact
*/
public String getName() {
return name;
}
/**
* toString that displays the emergency contact information
* @return all the emergency contact information in a readable format
*/
public String toString() {
return "Emergency contact name: " + this.name + "\nEmergency contact phone: " + this.phone;
}
}