Cognizant Interview Question

What is OOPs and Difference between Polymorphism and Abstraction?

Interview Answer

Anonymous

Oct 6, 2025

OOPs stands for Object-Oriented Programming System. It’s a programming approach that organizes the code into objects that contain both data and behavior. The main principles of OOPs are: Encapsulation – wrapping data and methods into a single unit (class). Abstraction – hiding unnecessary implementation details. Inheritance – reusing code by creating new classes from existing ones. Polymorphism – performing a single action in different ways. Abstraction hides the implementation details, while Polymorphism defines different behaviors for the same function depending on the object.