Pergunta de entrevista da empresa Cambly

What was the difference between composition and inheritance?