/** An executive: an employee with a bonus. */
public class Executive extends Employee {
    /** Yearly bonus */
    private double bonus;
    
    /** Constructor: a person with name n, year hired d,
        salary 50,000, and bonus b */
    public Executive(String n, int d, double b) {
        super(n, d);
        bonus= b;
    }
    
    /** = this executiveÕs bonus */
    public double getBonus() {
        return bonus; 
    }
    
    /** = this executiveÕs yearly compensation */
    public double getCompensation() {
        return super.getCompensation() + bonus; 
    }
    
    /** = a representation of this executive */
    public String toString() { 
        return super.toString() + ", bonus " + bonus; 
    }
}