abstract class Employee { public final static int MANAGER = 0; public final static int SALES_MAN = 1; public final static int NORMAL_EMPLOYEE = 2; public final static int ACCOUNTANT = 3; public final static int OTHER = 4; protected int type; public Employee() { type = NORMAL_EMPLOYEE; } public Employee(int type) { this.type = type; } public int getEmployeeType() { return type; }} class Manager extends Employee { public Manager() { super(MANAGER); } } interface SalesManInterface { public int getSalesAmount(); } class SalesMan extends Employee implements SalesManInterface{ public SalesMan() { super(SALES_MAN); } public int getSalesAmount() { return -1; }
} interface NormalEmployeeInterface { public int getWorkDayAmount(); } class NormalEmployee extends Employee implements NormalEmployeeInterface { public NormalEmployee() { } public int getWorkDayAmount() { return -1; }
public final static int MANAGER = 0;
public final static int SALES_MAN = 1;
public final static int NORMAL_EMPLOYEE = 2;
public final static int ACCOUNTANT = 3;
public final static int OTHER = 4;
protected int type;
public Employee() {
type = NORMAL_EMPLOYEE;
}
public Employee(int type) {
this.type = type;
}
public int getEmployeeType() {
return type;
}}
class Manager extends Employee {
public Manager() {
super(MANAGER);
}
}
interface SalesManInterface {
public int getSalesAmount();
}
class SalesMan extends Employee implements SalesManInterface{
public SalesMan() {
super(SALES_MAN);
} public int getSalesAmount() {
return -1;
}
}
interface NormalEmployeeInterface {
public int getWorkDayAmount();
}
class NormalEmployee extends Employee implements NormalEmployeeInterface {
public NormalEmployee() {
} public int getWorkDayAmount() {
return -1;
}
}