Objective
A protocol is an informal interface that contains a set of methods or rules that a class needs to adhere to.
Note:
- Interface is a layer of abstraction between the Superclass and the Subclass.
- We say informal ‘cause it is not strictly needed. It is just a way of writing code that is self-documenting, hence preventing errors.