A java console app to show the work with inheritance