Pergunta de entrevista da empresa L3Harris

What is the difference between inheritance and encapsulation?

Resposta da entrevista

Sigiloso

3 de fev. de 2021

Inheritance vs. encapsulation: not related except both commonly found in OO languages. • Inheritance: IS-A relationship that extends by specializing in subclasses • Encapsulation is information-hiding in a class. Outside world is ignorant of implementation, only class/objects know and manipulate details.

1