/* HourlyEmployee.java        Authors: Koffman & Wolz
 * Represents an hourly employee.
 * Extends NewEmployee
 */
public class HourlyEmployee extends NewEmployee {

  // data fields
  private double hours;
  private double rate;

  // methods
  // constructors 
  public HourlyEmployee() {
  }

  public HourlyEmployee(String name, String social) {
    super(name, social);
  }

  public HourlyEmployee(String name, String social, String job,
                     String address, String phone, int age, int year,
                     double totPay, double hours, double rate) {
    super(name, social, job, address, phone, age, year, totPay);
    this.hours = hours;
    this.rate = rate;
  }

  public void setHours(double hours) {
    this.hours = hours;
  }

  public void setRate(double rate) {
    this.rate = rate;
  }

  public double getHours() {
    return hours;
  }

  public double getRate() {
    return rate;
  }

  public double calcWeeklyPay() {
    return hours * rate;
  }

  public String toString() {
    return super.toString() + 
           "\nweekly hours: " + hours +
           ", hourly rate $" + rate;
  }

}

