16 lines
354 B
Java
16 lines
354 B
Java
package Testat1.Aufgabe1;
|
|
|
|
public class Manager extends Employee{
|
|
protected double bonus;
|
|
|
|
public Manager(String name, int age, double salary, String department, double bonus) {
|
|
super(name, age, salary, department);
|
|
this.bonus = bonus;
|
|
}
|
|
|
|
@Override
|
|
public double calculateYearlyIncome() {
|
|
return super.calculateYearlyIncome() + bonus;
|
|
}
|
|
|
|
} |