class UnpaidIntern extends Employee {
override public function receivePayment():Number {
return 0;
}
}
class Manager extends Employee {
override public function receivePayment():Number {
return baseSalary*3;
}
}
class Engineer extends Employee {
override public function receivePayment():Number {
return this.baseSalary*2;
}
}
class Employee {
internal var baseSalary:Number = 1000;
public function receivePayment():Number {
return this.baseSalary;
}
}
|