/** * Representation of an exempt employee. * An exempt employee has a flat weekly pay rate * @author Hal Perkins * @version CSE143 Sp03 lecture example */ public class ExemptEmployee extends Employee { // additional instance variables private double payRate; // employee weekly pay in dollars /** * Construct a new exempt employee with the give name, id number, and weekly pay * @param name Employee's name * @param id Employee's id number * @param pay Employee's weekly pay rate in dollars */ public ExemptEmployee(String name, int id, double pay) { super(name, id); payRate = pay; } /** * Return the pay earned by this employee. * @return Employee's pay for the current pay period */ public double getPay() { return payRate; } /** * @return a string representation of this exempt employee */ public String toString() { return "ExemptEmployee(name = " + getName() + ", id = " + getId() + ", pay = " + getPay() + ")"; } }