-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployee.java
More file actions
36 lines (32 loc) · 951 Bytes
/
Employee.java
File metadata and controls
36 lines (32 loc) · 951 Bytes
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
public abstract class Employee implements Payable{
private String firstName;
private String lastName;
private String socialSecurityNumber;
public Employee(String firstName,String lastName,String socialSecurityNumber) {
this.firstName=firstName;
this.lastName=lastName;
this.socialSecurityNumber=socialSecurityNumber;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
private void setLastName(String lastName) {
this.lastName = lastName;
}
public String getSocialSecurityNumber() {
return socialSecurityNumber;
}
private void setSocialSecurityNumber(String socialSecurityNumber) {
this.socialSecurityNumber = socialSecurityNumber;
}
public String toString() {
return getFirstName()+" "+getLastName()+"\n"+
"social security number: "+getSocialSecurityNumber();
}
}