Object-Oriented Programming (OOP)
Select the correct name for: the practice of restricting direct access to an object's internal data to protect it from unintended interference.
Difficulty: Easy
About this MCQ
This Easy Object-Oriented Programming (OOP) MCQ checks one syllabus fact.
The question is: “Select the correct name for: the practice of restricting direct access to an object's internal data to protect it from unintended interference.”
The accepted answer is D. Data hiding. Select the correct name for the practice of restricting direct access to an object's internal data to protect it from unintended interference is answered by Data hiding option D Option A Instance variable does not match the stem it is a near-miss used to catch incomplete recall of Data hiding Option B Static member does not match the stem it is a near-miss used to catch incomplete recall of Data hiding Remaining alternatives Composition over inheritance fall outside the same rule and should be eliminated once Data hiding is identified Object-Oriented Programming OOP questions of this type reward precise definitions rather than approximate associations Object-Oriented Programming OOP recall of this distinction is a regular item in FPSC PPSC NTS and.
- A. Instance variable
Why not A: “Instance variable” is not correct. The accepted answer is D. Data hiding. Select the correct name for the practice of restricting direct access to an object's internal data to protect it from unintended interference is answered by Data hiding option D Op
- B. Static member
Why not B: “Static member” is not correct. The accepted answer is D. Data hiding. Select the correct name for the practice of restricting direct access to an object's internal data to protect it from unintended interference is answered by Data hiding option D Op
- C. Composition over inheritance
Why not C: “Composition over inheritance” is not correct. The accepted answer is D. Data hiding. Select the correct name for the practice of restricting direct access to an object's internal data to protect it from unintended interference is answered by Data hiding option D Op
- D. Data hiding ✓
Correct answer
D. Data hiding
Explanation
Select the correct name for the practice of restricting direct access to an object's internal data to protect it from unintended interference is answered by Data hiding option D Option A Instance variable does not match the stem it is a near-miss used to catch incomplete recall of Data hiding Option B Static member does not match the stem it is a near-miss used to catch incomplete recall of Data hiding Remaining alternatives Composition over inheritance fall outside the same rule and should be eliminated once Data hiding is identified Object-Oriented Programming OOP questions of this type reward precise definitions rather than approximate associations Object-Oriented Programming OOP recall of this distinction is a regular item in FPSC PPSC NTS and.
Source: Object-Oriented Programming (OOP) Official Reference Guide
Tags: computer science, oop, object-oriented programming, software design
Submitted by: MCQsHub Editorial
Related MCQs
- What term describes the following? a design guideline suggesting that building complex behavior by combining o...
- Identify the correct definition of Super keyword.
- The concept in which a keyword used in a subclass to refer to members or methods of its immediate parent class...
- What is the function or purpose of Message passing?
- Which of the following best names the concept in which the process by which objects communicate with one anoth...
- Choose the correct description of Singleton pattern.