Pergunta de entrevista da empresa Multicert

In context of OO programming, explain which is polymorphism, inheritance, and encapsulation.

Resposta da entrevista

Sigiloso

29 de out. de 2016

Polymorphism – means the ability of a single variable of a given type to be used to reference objects of different types, and automatically call the method that is specific to the type of object the variable references. Inheritance – is the inclusion of behavior (i.e. methods) and state (i.e. variables) of a base class in a derived class so that they are accessible in that derived class. Encapsulation – refers to keeping all the related members (variables and methods) together in an object.