/** A class that extends the abstract Employee class by
  adding a weeklySalary field, and implementing the 
  abstract earnings() method
*/
public class Boss extends Employee {
  private double weeklySalary;  // weekly pay

  /** a constructor that initializes the fields fistName,
    lastName, and weeklySalary according to the
    respective parameters */
  public Boss(String first, String last, double salary) {
    super(first, last);
    weeklySalary = salary;
  }

  /** implement the abstract earnings() method */
  public double earnings() {
    return weeklySalary;
  }

  /** override the toString() method */
  public String toString() {
    return "Boss: " + super.toString();
  }
}
