public abstract class HourlyWageEmployee extends Employee { //Instance Variable private TimeCard card; public HourlyWageEmployee(double rate) { super(rate < MINIMUM_WAGE ? MINIMUM_WAGE : rate); this.card = new TimeCard(); } public HourlyWageEmployee() { this(Employee.MINIMUM_WAGE); } public double[] getHours() { return this.card.getHours(); } public void recordHours(TimeCard.WorkDay day, double hours) { this.card.addHours(day, hours); } protected double totalHours() { double total = 0.0; for (double hours : this.getHours()) total += hours; return total; } public abstract double overtimeHours(); public double grossPay() { return (this.totalHours() + this.overtimeHours() * 0.5) * this.getPayRate(); } public String toString() { return super.toString() + "/Hour " + this.card; } }