Domanda di colloquio di TeamViewer

Explain inheritance and encapsulation. Differences and similarities?