// A class to represent employees in general (20-page manual). public class Employee { private int yearsWorked; public Employee(int years) { yearsWorked = years; } public int getHours() { return 40; // works 40 hours / week } public double getSalary() { return 100000.0; // $100,000.00 / year } // "getter" method so clients or subclasses // can see the value of a private field public int getYearsWorked() { return yearsWorked; } public int getVacationDays() { return 20 + 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 * yearsWorked; } public String getVacationForm() { return "yellow"; // use the yellow form } }