Not just data in inheritance
class Employee extends Person {
public double calculatePay (int hours) {
return hourlyRate * hours;
class Manager extends PerminantEmployee {
System.out.println(calculatePay());
class Sales extends PerminantEmployee {
public double calculatePay(int hours) {
return super.calculatePay(hours) + bonus;