You are on page 1of 1

package homeworkOOP3;

public class Profesor extends Employee{


private String courses;
private int experience;

public Profesor(String name, String address, String email,int employeeNumber,


int salary, String courses, int experience) {
super(name, address, email,employeeNumber,salary);
this.courses = courses;
this.experience = experience;
}

public String getCourses() {


return this.courses;
}

public int getExperience() {


return this.experience;
}

public double getProfesorSalary() {


double salary = 0;

if (experience <= 15 ) {
salary = this.getSalary();
}
else if (experience <= 20) {
salary = this.getSalary() * 1.1;
}
else {
salary = this.getSalary() * 1.15;
}

return salary;
}

You might also like