Domanda di colloquio di Infosys

what is the difference between encapsulation and inheritance?