Pregunta de entrevista de NTT DATA

Object Oriented Concepts

Respuesta de la entrevista

Anónimo

13 dic 2016

OOP is described with three words: Encapsulation, Inheritance, Polymorphism Encapsulation - that is where you separate data and code from external affects, and everybody knows how to access it and despite of implementation it is easily used. Also you take care if there is not side effect to the rest of the code. Inheritance - could be guessed by its name: some object inherits another objects features. Inheritance support hierarchy classification where inherited object called parent. Polymorphism - is processing object by its datatype. In other words it means, one method with multiple implementation, for a certain class of action. And which implementation to be used is decided at runtime depending upon the situation (i.e., data type of the object) This can be implemented by designing a generic interface, which provides generic methods for a certain class of action and there can be multiple classes, which provides the implementation of these generic methods.

1