Let us say that we want to construct managers using the same constructor method parameters. Then, we would have to declare a constructor in Manager as well like this:
public Manager(String newFirstName, String newLastName) {
super(newFirstName, newLastName);
}
This constructor is lazy by design. It is "passing through" the name parameters to it's superclass Employee.
Let's say we add an ivar to Manager "teamSize" that is a number representing the team size. We might then want two constructors:
public Manager(String newFirstName, String newLastName) {
super(newFirstName, newLastName);
this.teamSize = 0;
}
public Manager(String newFirstName, String newLastName, int newTeamSize) {
super(newFirstName, newLastName);
this.teamSize = newTeamSize;
}
We initially set the team size to a "default" value. We use zero here, but we could change that for any a default decided on.
Introduction To Objects With Java
(Chapter 502 - Inheritance)