Question
Which feature of OOP allows hiding implementation
details while showing only the necessary functionality?Solution
Abstraction allows a programmer to focus on essential features of an object while ignoring the underlying complexity. It defines the "what" of functionality without exposing the "how." For example, an interface Vehicle may have a method drive() without specifying how it operates. Different classes like Car and Bike can implement drive() in their way while hiding their internal details. Abstraction is achieved using abstract classes and interfaces. It simplifies system design by providing a clear separation of concerns, enabling developers to focus on high-level interactions rather than low-level details. Why Other Options Are Wrong Option A : "Inheritance" Inheritance enables code reuse by sharing functionality but does not inherently involve hiding implementation details. Option C : "Encapsulation" Encapsulation protects and restricts access to data but is more concerned with access control than hiding implementation logic. Option D : "Polymorphism" Polymorphism deals with dynamic method binding and does not focus on hiding details. Option E : "Composition" Composition models "whole-part" relationships and is unrelated to abstraction.
Which among the following regions in India is/are biodiversity hotspots? 1. Eastern Ghats 2. Eastern Himalayas 3. Nicobar Islands Select the correct ans...
Which of the following option is Incorrect about the “ National Savings (Monthly Income Account) Scheme, 2019 ”?
Which of the following option is incorrect about “PM Swasthya Suraksha Yojana”?
"Global Competitiveness Report" is released by which of the following organization?
Which among the following is not an indirect tax?
For the first time in India, medical benefit as a non-cash benefit was provided under?
Under the provisions of the Industrial Disputes Act 1947, the employer of any industry declares lay-off, is required to provide alternate employment to ...
What is a Green Index?
What does it mean when the economy experiences hyperinflation?
During which Five Year Planning was NABARD established?