JAMIA 2024 — Computer PYQ
JAMIA | Computer | 2024Which features of OOP indicates code reusability?
Choose the correct answer:
- A.
Abstraction
- B.
Polymorphism
- C.
Encapsulation
- D.
Inheritance
(Correct Answer)
Inheritance
Explanation
Mathematical Representation
Let B be the Base Class containing existing attributes and methods:
B={attribute1,method1,…,methodn}
Let D be the Derived Class. Through Inheritance (→), D automatically includes everything from B:
D=B∪{new_attributes,new_methods}
In terms of code reusability (R):
R∝Inheritance
By defining the property of a class C:
If D⊂B⟹Code from B is reused in D
Answer: The correct feature is Inheritance.
Explanation
Mathematical Representation
Let B be the Base Class containing existing attributes and methods:
B={attribute1,method1,…,methodn}
Let D be the Derived Class. Through Inheritance (→), D automatically includes everything from B:
D=B∪{new_attributes,new_methods}
In terms of code reusability (R):
R∝Inheritance
By defining the property of a class C:
If D⊂B⟹Code from B is reused in D
Answer: The correct feature is Inheritance.

