-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmployees.java
173 lines (151 loc) · 3.47 KB
/
Employees.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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
* Salwa Abdalla
* ICS3U Culminating Assignment: 1/21/2019
* Jeff Radulovic
*
* The employees class is a class to create a constructor and a getter
* and setter for each of the characteristics.
*
*/
import java.util.ArrayList;
public class Employees {
private String EmployeeNum;
private String FirstName;
private String LastName;
private String Username;
private String Password;
private String rank;
private String Birthdate;
private String Location;
private String Occupation;
private ArrayList<Message> PersonalMessages;
/**
* @return constructor for creating an instance of Employees
*/
public Employees(String EmployeeNum, String FirstName, String LastName, String Username, String Password, String rank, String Birthdate, String Location) {
this.EmployeeNum = EmployeeNum;
this.FirstName = FirstName;
this.LastName = LastName;
this.Username = Username;
this.Password = Password;
this.rank = rank;
this.Birthdate = Birthdate;
this.Location = Location;
this.PersonalMessages = new ArrayList<Message>();
}
/**
* @return getter for the employeeNum
*/
public String getEmployeeNum() {
return EmployeeNum;
}
/**
* @return getter for the username
*/
public String getUsername() {
return Username;
}
/**
* @return getter for the password
*/
public String getPassword() {
return Password;
}
/**
* @return the birthdate
*/
public String getBirthdate() {
return Birthdate;
}
/**
* @return the location
*/
public String getLocation() {
return Location;
}
/**
* @return the firstName
*/
public String getFirstName() {
return FirstName;
}
/**
* @return the lastName
*/
public String getLastName() {
return LastName;
}
/**
* @return getter for the rank
*/
public String getRank() {
return rank;
}
/**
* @return getter for the occupation
*/
public String getOccupation() {
return Occupation;
}
/**
* @return getter for the Messages
*/
public ArrayList<Message> getPersonalMessages() {
return PersonalMessages;
}
/**
* @param Message
* Add a message to person's message list
*/
public void addPersonalMessage(Message PersonalMessage) {
PersonalMessages.add(PersonalMessage);
}
/**
* @param employeeNum
* A setter for the Employee Number
*/
public void setEmployeeNum(String employeeNum) {
EmployeeNum = employeeNum;
}
/**
* @param username
* A setter for the UserName
*/
public void setUsername(String username) {
Username = username;
}
/**
* @param password
* A setter for the Password
*/
public void setPassword(String password) {
Password = password;
}
/**
* @param rank
* A setter for the Rank
*/
public void setRank(String rank) {
this.rank = rank;
}
/**
* @param Occupation
* A setter for the Occupation
*/
public void setOccupation(String Occupation) {
this.Occupation = Occupation;
}
/**
* @return specific format of the Employees to be printed
*/
public String toString() {
String result = "Employee Num : " + EmployeeNum;
result += "\nEmployee Name: " + FirstName + " " + LastName;
result += "\nLogin Information: " + Username + " " + Password;
result += "\nRank: " + rank;
result += "\nBirthdate: " + Birthdate;
result += "\nLocation: " + Location;
result += "\nPersonal Messages: " + PersonalMessages;
return result;
}
}