public class HourlyEmployee extends Employee {
    private final long hourlyRate;      // en céntimos
    private final int hours;

    public HourlyEmployee(String name, long hourlyRate, int hours) {
        super(name);
        this.hourlyRate = hourlyRate;
        this.hours = hours;
    }

    @Override
    public long monthlyPay() {
        return hourlyRate * hours;
    }
}
