Payroll-Inheritance03: Making our base classes abstract - Exercise

Contact Us or call 1-877-932-8228
Payroll-Inheritance03: Making our base classes abstract - Exercise

Payroll-Inheritance03: Making our base classes abstract

Duration: 5 to 5 minutes.
  1. Mark the Person and Employee classes as abstract
  2. Make the getPayInfo() method abstract in Employee

Solution:

Solutions/Payroll-Inheritance03/employees/Person.java
package employees;

public abstract class Person {

---- C O D E   O M I T T E D ----
}

Solution:

Solutions/Payroll-Inheritance03/employees/Employee.java
package employees;

public abstract class Employee extends Person {

---- C O D E   O M I T T E D ----

	public abstract String getPayInfo();
}
Next