-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerson.java
More file actions
44 lines (40 loc) · 1.46 KB
/
Copy pathPerson.java
File metadata and controls
44 lines (40 loc) · 1.46 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
/**
* This class is used to create person objects that store information about
* members of a project.
*
* @author Cherol Phoshoko
* @version 16.0.2, 2021-09-09
*/
public class Person {
// field variables
String name, surname;
String userType;
String telephoneNum;
String email;
String physicalAdd;
/**
* Person constructor <br>
*
* @param name String contains first name of the person
* @param surname String contains last name of the person
* @param userType String determines the type of person object created
* @param telephoneNum String determines the phone contact of the person
* @param email String contains the email address of the person
* @param physicalAdd String contains the physical address number person
*/
public Person(String name, String surname, String userType, String telephoneNum, String email, String physicalAdd) {
this.name = name;
this.surname = surname;
this.userType = userType;
this.telephoneNum = telephoneNum;
this.email = email;
this.physicalAdd = physicalAdd;
}
/**
* @return Properly formatted object details
*/
public String personDetails() {
return userType + "\nName: " + name + " " + surname + "\nTelephone Number: " + telephoneNum
+ "\nEmail address: " + email + "\nPhysical Address: " + physicalAdd;
}
}