Q: In object oriented programming, the stress is given on
-
A
procedure
-
B
data
-
C
class
-
D
methods
B
Answer:
B
Explanation:
In object-oriented programming (OOP), the primary focus is on (b) data.
Explanation:
- Data:
- OOP emphasizes the encapsulation of data and the behaviors (methods) that operate on that data within objects.
- Objects are instances of classes, and they hold both data (attributes or properties) and methods (functions or behaviors) that manipulate that data.
- This approach helps in modeling real-world entities more effectively and ensures that data is protected and managed within the context of the objects.
Related Concepts:
- Class: A blueprint for creating objects, defining the data and methods that the objects will have.
- Methods: Functions defined within a class that describe the behaviors of the objects created from the class.
- Procedure: More relevant to procedural programming, where the focus is on writing sequences of instructions to perform tasks.
Therefore, while classes and methods are integral parts of OOP, the stress in OOP is on organizing and encapsulating data within objects.
Related Topic:
Share Above MCQ