Pregunta de entrevista de Squelch

Inheritance VS composition: pros and cons.

Respuesta de la entrevista

Anónimo

21 ene 2019

Inheritance should be used only if we can describe a relationship with a phrase like "X is a Y", like "student is a person". In all other cases composition/aggregation should be used.