// Inheritance Project // employeehierarchy Module // Implements this inheritance hierarchy: // Person <-- Employee <-- Executive // Instance variables are set with the constructor; // instance variables are read with the toString method. public class Executive extends Employee { private double bonus; public Executive(String theName, char theGender, int theAge, int theId, double theSalary, double theBonus) { super(theName, theGender, theAge, theId, theSalary); bonus = theBonus; } @Override public String toString( ) { return super.toString( ) + " " + bonus; } @Override public double getCompensation( ) { return salary + bonus; } }