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.
What was the growth rate of India's real GDP in Q2 of FY2024-25, as compared to Q1 of the same fiscal year?
LIC, ____________________ and New India Assurance are identified as Domestic Systemically Important Insurers (D-SIIs) for 2021-22.
According to the medal standings of the Milano–Cortina Winter Olympics 2026, which host nation finished fourth with 10 Gold medals and 30 total medals...
State Bank of Sikkim has signed a bancassurance pact with which life insurance company to make insurance solutions accessible to the residents of Sikkim...
SEBI has approved the launch of the beta version of T+0 settlement on an optional basis. What does T+0 settlement signify?
Which two institutions have signed a strategic MoU to strengthen research, innovation, and extension in the dairy sector in India?
Lupin Limited has launched its new state-of-the-art Regional Reference Laboratory in ________ as part of the expansion of its diagnostics network.
Who has been rated A+ in the Global Finance Central Banker Report Cards 2023, placing at the top of the list of three central bank governors receiving t...
Which company is building the world’s largest data center in Jamnagar, Gujarat?
Who will deliver the keynote address as the nodal officer of NAVIC Cell 4 at the Mumbai cruise tourism conference?