Introduction / Context:
Object-oriented programming (OOP) emphasizes modeling with objects and relationships. Core features typically cited are encapsulation, inheritance, and polymorphism. Among the listed choices, we select the capability that is essential to OOP and distinguishes it from purely procedural languages.
Given Data / Assumptions:
- We evaluate language features from an OOP perspective.
- Some options are unrelated to OOP (e.g., preprocessor includes).
- We look for the answer that is genuinely characteristic of OOP.
Concept / Approach:
- Inheritance enables a class to derive behavior and state from another, supporting hierarchies and reuse.
- Functions returning one value are a general programming notion, not OOP-specific.
- #include pertains to source composition in C/C++, not OOP.
Step-by-Step Solution:
Identify OOP hallmark among options → inheritance.Eliminate distractors unrelated to OOP.Conclude that “inheritance” is the minimum requirement listed that aligns with OOP.
Verification / Alternative check:
Languages regarded as OOP (C++, Java, C#) support inheritance and polymorphism; procedural languages without inheritance are not considered OOP.
Why Other Options Are Wrong:
- Single-value returns: Common across paradigms; not an OOP criterion.
- #include files: Preprocessing mechanism; not part of OOP semantics.
- All of the above: False because only one choice is relevant to OOP.
Common Pitfalls:
- Confusing language build mechanisms with OOP features.
- Assuming encapsulation alone implies OOP—even encapsulation without inheritance/polymorphism is often viewed as “object-based.”
Final Answer:
inheritance
Discussion & Comments