/** * Basic Employee class * Student "extends" the Person class * Thus it inherits all the methods and instance variables from Person */ public class Employee { /** * Default constructor * If you don't specify a default constructor * the compiler will provide one for you that initializes * all variables to their default values. */ public Employee() { // implicit call to Employee's superclass constructor somePerson = new Person(); employeeID = 00000000; } /** * Retrieves the employee's id * @return student id */ public int getEmployeeID() { return this.employeeID; } /** * Sets the employee's id. * @param id new employee id */ public void setEmployeeID(int id) { this.employeeID = id; } public void overridingTest() { somePerson.overridingTest(1, somePerson); System.out.println( "Employee Class overridingTest" ); } public void overridingTest(int i) { somePerson.overridingTest(1, somePerson); System.out.println( "Employee Class overridingTest" ); } /** * instance variables - employeeID can only be seen by Employee */ private int employeeID; private Person somePerson; }