interface IAnimal{
public int getLegCount();
public String getName();
}
class Dog implements IAnimal{ //Here you see that the Dog class has implemented all the methods that the IAnimal interface has
public int getLegCount(){ return 4; }
public String getName(){ return "Dog"; }
}
abstract class Human implements IAnimal{ //Here you see that the Human class has implemented some methods, while leaving others for child classes to implement
public int getLegCount(){ return 2; }
public abstract String getName();
}
class MaleHuman extends Human{ //Here you see that the MaleHuman class implements the remaining methods that weren't implemented in Human
public String getName(){ return "Male Human"; }
}