Codele / Advanced programming

Abstract classes and interfaces

Sometimes a part of a program only cares what an object can do, not what it is. A promise such as “anything payable must have pay()” lets many different objects fit in the same slot.

Loading the playable lesson…