1  public class SalariedEmployee extends Employee
  2  {
  3     private double annualSalary;
  4  
  5     /**
  6        Constructs a salaried employee with a given name and annual salary.
  7        @param name the name of this employee
  8        @param salary the annual salary
  9      */
 10     public SalariedEmployee(String name, double salary)
 11     {
 12        setName(name);
 13        annualSalary = salary;
 14     }
 15  
 16     public double weeklyPay(int hoursWorked) 
 17     {
 18        final int WEEKS_PER_YEAR = 52;
 19        return annualSalary / WEEKS_PER_YEAR;
 20     }
 21  }