
public class Manager extends Employee {

	private Employee[] list = new Employee[5];
	private int index = 0;

	public Employee[] getList() {
		return list;
	}

	public void setList(Employee[] list) {
		this.list = list;
	}

	public void setEmployee(Employee emp) {
		// add employee to list and increment index
		list[index++] = emp;
	}

	public void displayManagerInformation() {
		System.out.println("*******************************");
		System.out.println("***** Manager Information *****");
		System.out.println("*******************************");
		System.out.println("Employee Id: " + getEmployeeId());
		System.out.println("Name: " + getName());
		System.out.println("Job Title: " + getJobTitle());
		System.out.println("Level: " + getLevel());
		// loop list of employees
		for (int i = 0; i < list.length; i++) {
			if (list[i] != null) {
				System.out.println("\t-" + list[i].getName() + ", " + list[i].getJobTitle());
			}
		}
	}
}
