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