-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBusinessEmployee.java
More file actions
26 lines (21 loc) · 970 Bytes
/
Copy pathBusinessEmployee.java
File metadata and controls
26 lines (21 loc) · 970 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
public class BusinessEmployee extends Employee {
public BusinessEmployee(String name){
//Has a default salary of 50000
super(name,50000.00);
}
public double getBonusBudget(){
//Should establish a running tally of the remaining bonusBudget for the team this employee supports.
// How that budget is determined will depend on which type of Business Employee it is
return bonusBudget;
}
public void setBonusBudget(double bonusBudget) {
this.bonusBudget = bonusBudget;
}
public String employeeStatus(){
//Should return a String representation of this BusinessEmployee that includes
// their ID, name and the size of their currently managed budget.
// Example: "1 Kasey with a budget of 22500.0"
String s= String.format("%.2f",bonusBudget);//reduce the double to 2 decimals
return this.toString()+" with a budget of "+ s;
}
}