Create Java classes Manager and Secretary
that are subclasses of Employee;
these classes should also be part of the personnel package.
A manager is an employee who has a bonus over and above his/her salary.
A secretary is an Employee who reports to a boss.
For Manager, you will need to define a 3-parameter constructor
(indicating name, salary, and bonus)
and a getBonus() method.
For Secretary, you will need to define a 3-parameter constructor
(indicating name,salary, and manager) and a getBossName() method.
Execute CompanySimulation once you have created the classes
(to execute from Eclipse,
select Run->Run...->Java Application,
choose CompanySimulation as the name of the main class,
and then click on the Run button).
The execution should produce the following output:
Wayland's boss is Montgomery
Montgomery has an additional bonus of 20000.0
----------
Homer's salary is 10000.0
Montgomery's salary is 100000.0
Wayland's salary is 20000.0
Carl's salary is 11111.0
Lenny's salary is 12345.0
----------
Salary of Homer is 10500.0
Salary of Montgomery is 105000.0
Salary of Wayland is 21000.0
Salary of Carl is 11666.55
Salary of Lenny is 12962.25
Note: you will need to call the appropriate
superclass constructor from the subclasses you wrote
(use super(...) ).