-
Notifications
You must be signed in to change notification settings - Fork 0
/
EmployeeStaff.java
43 lines (32 loc) · 1.26 KB
/
EmployeeStaff.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
public class EmployeeStaff extends EmployeePerson {
private String managerName;
// ***********************************************************************
// Default constructor
public EmployeeStaff() {
managerName = "";
}
// ***********************************************************************
// Constructor with parameters
public EmployeeStaff(String reportsTo) {
managerName = reportsTo;
}
// ***********************************************************************
// Get the name of the manager
public String getManagerName() {
return managerName;
}
// ***********************************************************************
@Override
public void printInfo() {
System.out.println("Name: " + fullName + ", Department: " +
departmentCode + ", Birthday: " + birthday +
", Salary: " + annualSalary +
", Manager: " + getManagerName());
}
// ***********************************************************************
// The annual bonus for a staff member is 7.5% of the annual salary.
@Override
public int getAnnualBonus() {
return (int)(annualSalary * 0.075);
}
}