Commit 7e268de1 authored by Amirhosein Rajabpour's avatar Amirhosein Rajabpour

final commit

parent d9f25ffb
......@@ -4,6 +4,7 @@ import java.util.ArrayList;
public class Professor extends AbstractEmployee
{
private double income = 0;
private ArrayList<Course> courses;
private ArrayList<Article> articles;
private String group;
......@@ -12,6 +13,20 @@ public class Professor extends AbstractEmployee
Department department, String position, double basicIncome, String group) {
super(firstName, lastName, ID, joiningYear, department, position, basicIncome);
this.group = group;
this.income = 0;
}
public void income(Professor professor){
income = (professor.articles.size()*1000) + basicIncome;
}
public void setIncome(double income) {
this.income = income;
}
public double getIncome() {
return income;
}
public void addArticle(Article a){
......
......@@ -4,14 +4,32 @@ import java.util.Date;
public class ServiceEmployee extends AbstractEmployee
{
double income = 0;
int additionalHour = 0;
public ServiceEmployee(String firstName, String lastName, String ID, int joiningYear, Department department, String position, double basicIncome) {
super(firstName, lastName, ID, joiningYear, department, position, basicIncome);
this.income = 0;
}
int passedDays = 0;
public void setPassedDays(int passedDays) {
this.passedDays++;
}
public void income(ServiceEmployee serviceEmployee){
income = ( additionalHour*500) + basicIncome;
}
public double getIncome() {
return income;
}
public void setIncome(double income) {
this.income = income;
}
public void setAdditionalHour(int additionalHour) {
this.additionalHour = additionalHour;
}
@Override
public boolean isPromotable() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment