1.

Which feature may be violated if we don’t use classes in a program?(a) Inheritance can’t be implemented(b) Object must be used is violated(c) Encapsulation only is violated(d) Basically all the features of OOP gets violatedThis question was posed to me in an internship interview.Asked question is from OOPs Features in chapter OOPs Concept & Features of Object Oriented Programming

Answer»

Correct CHOICE is (d) Basically all the features of OOP gets violated

The BEST I can explain: All the features are violated because INHERITANCE and ENCAPSULATION won’t be implemented. Polymorphism and Abstraction are still possible in some cases, but the main features like DATA binding, object use and etc won’t be used hence the use of class is must for OOP concept.



Discussion

No Comment Found

Related InterviewSolutions