Question
Which of the following best describes Abstraction in
Object-Oriented Programming (OOP)?Solution
Abstraction is a core concept of OOP that focuses on hiding unnecessary implementation details while exposing only the essential features of an object. This is achieved through abstract classes and interfaces. For instance, a Car class might expose methods like start() or drive() without detailing how the engine works internally. Abstraction simplifies the development process by allowing programmers to focus on high-level logic rather than low-level complexities. It also enhances security by preventing direct access to sensitive parts of an application. Why Other Options Are Incorrect : 2. Restricting access to certain parts of an object to protect data : This describes Encapsulation , not Abstraction. Encapsulation involves bundling data and methods together and using access modifiers to control visibility. 3. Combining different objects into a single unit to represent a relationship : This describes Aggregation , where objects are linked to represent "has-a" relationships, like a Library having Books. 4. Allowing multiple classes to share the same method name but with different implementations : This defines Polymorphism , specifically method overriding or overloading, and is unrelated to abstraction. 5. Establishing a parent-child relationship between classes : This is Inheritance , where one class derives from another, enabling code reuse and hierarchy building.
In the financial year 2023-24, what was the percentage growth in IREDA's loan book outstanding, marking a significant increase in its financial performa...
Which organization imposed a ₹1,000 crore penalty on the Punjab government for failing to manage waste?Â
Which organization recently received in-principle RBI approval for a Cross-Border Payment Aggregator license?
What is the maximum collective investment cap for Regulated Entities (REs) in any Alternative Investment Fund (AIF) scheme, effective from January 1, 2026?
Which year Indian stamp Act came ?
In which location did the commencement of the 11th India-Kyrgyzstan Joint Special Forces Exercise KHANJAR take place?
What was the theme for the International Day of Girl Child 2022?
- In which Indian city was the AI centre for Geospatial Analytics established by the Maharashtra government in partnership with Microsoft?
According to the recent Multidimensional Poverty Index (MPI), Poverty in India fell by _______million in 15 yrs.
What among the following did Union Home Minister Amit Shah launch recently to strengthen farmers' prosperity and enhance self-reliance in pulse production?