public double getWages() { // must be either faculty or staff for wages
return 0.0;
}
}
// Faculty.java: the class Faculty
public class Faculty extends Employee {
// inherits from Employee
protected double salary;
// Constructor
public Faculty(double s, String n, String a) { // salary, name, address
// Fill in for Part b.
}
// convert the Faculty class to a String
public String toString() {
// Fill in for Part c.
}
public double getWages() {
return salary;
}
}
// Staff.java: the class Staff
public class Staff
// Fill in for Parts d., e., f.
}
// Persons.java: test the Person-Employee-Faculty-Staff
hierarchy
public class Persons {
public static void main (String[] args) {
Person[] persons = new Person[3];
persons[0] =
// Fill in for Part g.
persons[1] =
// Fill in for Part g.
persons[2] =
// Fill in for Part g.
printPersons(persons);
System.out.println();
}
public static void printPersons(Person[] s) {
for (int i = 0; i < s.length; i++)
