Programming, Swift, Object Oriented, Objective C.
allows creating new objects based on existing, inheriting properties and behaviour. We must be able to use the new object where the base object can be used. For our example we must be able to use DisplayCanvas wherever we can use Canvas. /// Draws canvas to a destination func draw(_ canvas: Canvas)