You asked for a simple language instead of "computer speak:"
The interface is similar to a contract. The contract may say that
- Tell me your name (getName ())
- Say what you value (getRank ())
- Tell me your number (getNumber ())
The contract has a name (often ending in "capable" - observable, etc.). Let them say "Identifiable." If we declare that we are implementing a contract, we must fulfill all its requirements.
You could be human, and I could be a robot - different classes with different different characteristics and behavior.
class Human extends Object implements Identifiable class Robot extends Object implements Identifiable
A program can view us as very different objects. He can say that the robot must go and attach itself and charge. He can tell a person that he can do something that people can do. But he can ask any of them to identify themselves.
source share