// A class to represent employees in general (20-page manual). public class Employee { private int years; public Employee(int yearsWorked) { years = yearsWorked; } // "getter" method so clients or subclasses // can see the value of a private field public int getYears() { return years; } public int getHours() { return 40; // works 40 hours / week } public double getSalary() { return 40000.0; // $40,000.00 / year } public int getVacationDays() { return 10 + getSeniorityBonus(); } // separating out the seniority bonus calculation from // the vacation day calculation means subclasses can // override just this behavior (see Secretary) public int getSeniorityBonus() { return 2 * years; } public String getVacationForm() { return "yellow"; // use the yellow form } }