// Models lawyers who can sue, get 5 more vacation days and // get a $5000 raise every year public class Lawyer extends Employee { public Lawyer(int years) { super(years); } // Lawyers start with 5 extra vacation days. public int getVacationDays() { return super.getVacationDays() + 5; } public String getVacationForm() { return "pink"; // use the pink form } // Overloaded version of getVacationForm to get special // form for Tahiti vacations. public String getVacationForm(String location) { if (location.equals("Tahiti")) { return "red"; } return getVacationForm(); } // need to use super. to access overridden definition // of getSalary from Employee. // getYearsWorked is simply inherited so we don't need super. public double getSalary() { return super.getSalary() + 5000 * getYearsWorked(); } public void sue() { System.out.println("Sue you!"); } }