/*
 *  File: HourlyEmployee.java
 *  Name: cpsc115 
 
    This class defines a HourlyEmployee as an Employee subclass.  It overrides
    the calculatePay() method.  Only HourlyEmployees use hours and payRate
    to calculate their pay, which is why these attributes are defined here
    instead of in the superclass.

 */

public class HourlyEmployee extends Employee {
    
    private double hours;
    private double payRate;

    public HourlyEmployee(String name, int id, String title,double hours, double payRate) {
	super(name, id, title);
	this.hours = hours;
	this.payRate = payRate;
    }


    public double calculatePay() {
	return hours * payRate;
    }
}