โContractโ is not some new terminology that Taylor came up with. This is a very common term that programmers use.
An interface is a contract, but a contract does not have to be an interface. The interface in a nutshell defines the contract that classes should implement.
An abstract class is also a contract. The difference is that an abstract class can provide actual implementations, state, etc., and as a result it is (in a sense) a more strict contract.
Another key difference is that a child class can extend only 1 abstract class, but it can implement several interfaces.
Thus, a โcontractโ is not a new naming convention. This is a general term that Taylor uses.
source share