class Employee { String name; float salary; public Employee(String name, float salary) { this.name = name; this.salary = salary; } public String getName() { return name; } public float getSalary() { return salary; } } class Boss extends Employee { float bonus; public Boss(String name, float salary) { super(name, salary); bonus = 0; } public float getBonus() { return bonus; } public void setBonus(float bonus) { this.bonus = bonus; } } public class Test { public static void main(String[] args) { Boss boss; List employees = new LinkedList(); employees.add(new Employee("Alice", 20)); employees.add(boss = new Boss("Bob", 1000)); boss.setBonus(100); } }