// Models secretaries who don't get more vacation days based on seniority // and know how to take dictation. // goal: illustrate dynamic binding -- when getVacationDays is // called in a Secretary, it calls Secretary's version of // getSeniorityBonus(). public class Secretary extends Employee { // Create a new secretary with the specified seniority. public Secretary(int years) { super(years); } // Take dictation. public void takeDictation() { System.out.println("Taking dictation!"); } // Secretaries get no extra vacation days based on seniority. public int getSeniorityBonus() { return 0; } }